In article "Can't see array in subs" (on 10.06.96), Tim Hutzler@1:119/88
ys:
Hello Tim !!
> DIM rec AS SHARED Crec
>
> In the body I can reference it okay, but when I reference it in a sub from
> within a sub - I get a 481 error.
That's correct.
> SUB mysub (x%)
> ...
> ....Pfield "Street Name: ", rec.StName, 20
> Error points here---------------------^
>
>
> The argument count is correct,...
>
> SUB Pfield (x$, y$, l%)
Use the BYVAL statment, so try
SUB Pfield (x$, BYVAL y$, l%)
^^^^^
> Any advise or suggestions would be appreciated.
simple problems ...
> tnx
Regards,
----------------
/
/ h o m a s
email: author@pbsound.snafu.de
www : http://www.snafu.de/~pbsound/ (PowerBASIC's Home in Germany)
PBSOUND - The Sound Blaster Toolkit, PowerBASIC-FAQ, PowerBASIC-
sources & toolboxes, PowerBASIC on Web, PowerBASIC News and much
more or less important PowerBASIC stuff.
--- CrossPoint v3.1 R
---------------
* Origin: -= http://www.snafu.de/~pbsound/ =- (2:2410/301.12)
|