[futurebasic] Re: [FB] Local fn Variable

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2000 : Group Archive : Group : All Groups

From: Pete <furbies@...>
Date: Thu, 25 May 2000 22:41:22 +1000
Steven J. Stratford <sstratford@...> on 25/5/00 10:03 PM scribed :

> Use a true record:
> 
> begin record arecord
> dim a%
> dim b$
> dim c as rect
> end record
> 
> clear local
> local fn test(r as pointer to arecord)
> r.a%=45
> r.b$="testing 1.2.3"
> r.c.top=5
> r.c.left=2
> 'etc.
> end fn
> 
> dim r as arecord
> 
> fn test(r)
> print r.a%
> print r.b$
> print r.c.top
> print r.c.left
> 
> do 
> until mouse(_down)
> 
> --Steve

This is for FB^3, isn't it ??

Pete... 
> On 5/24/00 11:59 PM, Martin Fitzgibbons at d8171hn1@... wrote:
> 
>> How can you return more than one variable from a local fn?
>> 
>> Sending
>> 
>> lucky = fn testing(a,b)
>> 
>> is ok for sending 2 and returning 1 but how do I get more than 1 value
>> back?
>> 
>> Martin