Repeat

Kenneth Brody kenbrody at spamcop.net
Mon Mar 7 08:04:56 PST 2011


On 3/7/2011 10:31 AM, Richard Kreiss wrote:
[...]
>> You still haven't answered why you thought they were needed in the first
>> place.
>
> Simple, I was thinking in terms of what the pushkey command looks line,
> pushkey "[CDWN]",  and was trying to feed this to pushkey.
>
> Nowhere does it say that if one uses a variable, that the command structure
> is not necessary.

Why would it, since this is how everything within filePro works?

Consider:

     SHOW "Hello"

If you were to "use a variable", would you do this?

     qq = "Hello"
     show "\"" & qq & "\""

Or, to take it to an extreme:

     aa = "Hello"
     bb = "\"" & aa & "\""
     cc = "\"" & bb & "\""
     dd = "\"" & cc & "\""
     ...
     zz = "\"" & yy & "\""
     show "\"" & zz & "\""

Of course you wouldn't do that.  (At least I hope you wouldn't.)  You would 
just do:

     qq = "Hello"
     show qq

or:
     aa = "Hello"
     bb = aa
     cc = bb
     ...
     zz = yy
     show zz

Ditto for everything else within filePro where you can pass an expression.

I'd hate to think of how you would have put this in a variable:

     PUSHKEY "u[ENTR][ENTR]" & aa & "[SAVE]"

> It was a matter of how I interrupted what I needed to do.  Apparently my
> thinking was incorrect.

When you use a string literal, such as:

     PUSHKEY "[CDWN]"

you are _not_ passing an 8-character (including the quotes) value to 
whatever command you're using.  Rather, you are passing a 6-character string 
literal, consisting of what's inside the quotes.  The quotes are there to 
tell the parser that what is within the quotes is to be taken as a literal 
value.  They are not part of the value itself.

-- 
Kenneth Brody


More information about the Filepro-list mailing list