>>Barbara, I had checked help for #DEFINE before my posting (after pulling
>>out my old Clipper book to remind me how I used to do it), but it didn't
>>seem to allow for pseudo-commands. A second read a few minutes ago seems
>>to tell me it might work. I think tomorrow I'll put one in "clipper style"
>>and see what happens.
>>
>>Thanks,
>
>The fox help was never too clear on the subject, so one got an
>impression you could #define constants only. But then, it just goes
>substituting without paying much attention to what it substitutes, so
>you can substitute anything, just provided it's not somewhere in mid
>word, i.e. you can have your word replacing a group of words or any
>expression. I remember I've had a thing like
>#define cram =Fwrite(FileHandle, chr(13)+chr(10)+
>Later in the source it read
> Cram "A row of text")
> Cram "...and more text")
>
>Seemed funny with unbalanced parentheses, but saved me a lot of typing.
I may end up doing the same, just to save lots of typing or cut/paste.
What I was hoping to do was the equivilant of a Clipper pseudo-command. A programmer could create one that required a parameter to actually use. This was very usefull for displaying statistics as such:
#DEFINE DISPSTAT ALLTRIM(TRANSFORM, %nParameter, "999,999" ) )
@ 0, 0 SAY DISPSTAT( iRead )
@ 1, 0 SAY DISPSTAT( iRejected )
@ 2,0 SAY DISPSTAT( iWritten )
We aslo used this to calculate and display progress while indexing or looping thru a file. You can accomplish the same with a UDF, but with the function call comes overhead.