Question on global variables for CALL command
Brian K. White
brian at aljex.com
Thu Mar 2 13:59:42 PST 2006
----- Original Message -----
From: "Boaz Bezborodko" <boaz at mirrotek.com>
To: <filepro-list at lists.celestial.com>
Sent: Thursday, March 02, 2006 4:13 PM
Subject: Question on global variables for CALL command
> Can you declare a global variable longer than 2-characters in automatic
> processing for being able to pass it to a CALLed table?
>
> IOW, can I say DECLARE paid(1,yesno) in an auto table and have it passed
> in a CALLed table or does it have to be a one- or two-character table?
>
> Thanks in advance.
You can but it doesn't need to be in auto for that.
defining 2-character variables in auto is one way to have the variable
available to call tables
That doesn't use the declare statement, you simply define the variable.
pd(1,yesno)
The declare statement is for long variables and to make them available in
call tables you don't need to declare in auto.
You may, but all you need to do is declare global (with definition if any)
in the parent table and declare extern without definition in the child table
or vice versa.
You could declare global in auto instead of the parent table if you wanted
it to be available to reports and other processes.
input/report table:
declare global paid(1,yesno)
call table:
declare extern paid
Note that "declare global" is unrelated to the "global" flag as part of the
definition.
For example if you needed the value to hold from record to record you would
still add the ",g"
declare global paid(1,yesno,g)
I don't know if declaring without global, but in auto, will behave as if
you'd declared global,
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
>
> Boaz
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
More information about the Filepro-list
mailing list