TH> DIM rec AS SHARED Crec
TH> 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.
TG> That's correct.
NO, NO! Don't say that!!! I pass TYPED records all the time. And, I
need to be able to modify them from within the SUB.
For instance - I have several subs like the following:
SUB BitCode (i%, b%, w%, s%)
i% = (i% + s% * 2 ^ b%) AND (w% * 2 ^ b%) OR (i% AND NOT (w% * 2 ^ b%))
END SUB
(I'll convert to ASM, once I figure out how pass the TYPE record)
The above is called like this:
BitCode rec.PDate, 11, 3, 1
This works fine with QuickBASIC, but not PowerBASIC.
I find it hard to believe that the programmers at PowerBASIC didn't
make some sort of provision to accomodate this.
TG> Use the BYVAL statment, so try
TG> SUB Pfield (x$, BYVAL y$, l%)
That will not work in all instances where I need to modify the
element. What do I do in the above case.
TH> Any advise or suggestions would be appreciated.
TG> simple problems ... * Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|