Syntax Error???
Joe Chasan
joe at magnatechonline.com
Fri Aug 27 06:59:02 PDT 2004
On Fri, Aug 27, 2004 at 09:50:43AM -0400, Tim Fischer wrote:
> I've got 2 lines of code to generate passwords. Currently, I use it in 3
> files in my system. I'm now trying to use it in my 4th file, but when I
> copy the code in, it gives me a syntax error.
>
> Here's the code:
>
> mkrand ~ If: pc lt "6"
> ~
> Then: 282 = 282 { mid(pa,mod(rand(" "),"35"),"1") ; pc = pc + "1" ;
> goto mkrand
>
> Basically, this grabs a random character out of my dummy variable pa between
> 0 and 35. Obviously, it loops through 6 times to get a 6 character
> password. The variable pa is defined as (36,*) and is filled with possible
> characters for my password.
>
> Now, as I said, I copied the code into the new table and now get a syntax
> error in this new table:
>
> *** A filePro Error Has Occurred ***
>
> Line Number: 1031
>
> 282 = 282 { mid(pa,mod(rand(" "),"35"),"1") ; pc = pc + "1" ; goto mkrand
> ^
> Process contains a syntax error at position indicated.?
>
> I've checked the table for any long variables called "rand", but there are
> no long variables in the table.
>
> Any ideas what I should look for?
i'm not sure what space does for rand - don't you want rand("")
in any event, shot-in-the-dark - when wierd syntax errors like the
above happen to me with functions that use parentheses, i've often
found that there is an associated field defined in the file that is
lettered similar to one of the letters near the syntax error which
confuses filepro - inserting spaces before or after the parentheses
usually help this.
--- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ---
-Joe Chasan- Magnatech Business Systems, Inc.
joe at magnatechonline.com Hicksville, NY - USA
http://www.MagnatechOnline.com Tel.(516) 931-4444/Fax.(516) 931-1264
More information about the Filepro-list
mailing list