On Friday, Jul 18, 2003, at 08:42, Alain Pastor wrote: > Now, my problem: if I use a local function in lieu of a main program, > like so: > > local fn Test > dim as long myScoop(_nScoops) > dim as long @ n > > print "Combinations of"_nFlavours" items,"_nScoops" at a time" > print "With duplicates" > myScoop(1) = 1 : n = 0 > fn ShowScoops(myScoop(0),_withDuplicates,1,n) > > print:print "Without duplicates" > myScoop(1) = 1 : n = 0 > fn ShowScoops(myScoop(0),_withoutDuplicates,1,n) > end fn > > // main program > fn Test > the n variable is no longer incremented like I want. I must be missing > something here, but I have not yet figured out what it is despite of > my browsing the Sears web site in search for a clue to buy. Monsear, The above works OK this side of La Manche. Bernie