home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!math.fu-berlin.de!unidui!rrz.uni-koeln.de!not-for-mail
- From: aeg03@rrz.uni-koeln.de (Jan T. Kim)
- Newsgroups: comp.sys.atari.st.tech
- Subject: Re: GFA: SWAP *x%,x$() problem worked around
- Date: 23 Nov 1992 03:05:37 +0100
- Organization: Regional Computing Center, University of Cologne
- Lines: 49
- Message-ID: <1epe9hINN1oc8@rs1.rrz.Uni-Koeln.DE>
- References: <1eo71mINN1889@rs1.rrz.Uni-Koeln.DE>
- Reply-To: kim@vax.mpiz-koeln.mpg.dbp.de
- NNTP-Posting-Host: rs1.rrz.uni-koeln.de
-
- In <1eo71mINN1889@rs1.rrz.Uni-Koeln.DE> aeg03@rrz.uni-koeln.de (Jan T. Kim) writes:
-
- [description of trouble deleted]
-
- One more observation: GFA seems to fail to keep track what data types are stored in which area. The result of
-
- PRINT TYPE(*stb$())
-
- is -1, which is supposed to indicate that the passed pointer does
- not point to any valid data type. However, it should be 5 (for
- pointer to an array of strings). I still don't know what's going
- wrong, but then, that's Richter's or GFA's business...
-
- >Unfortunately, it doesn't seem to be possible to write a function
- >for swapping arrays manually. The problem is, swapping seems to
- >swap the internal pointers to the array descriptors rather than
- >the descriptors themselves. But maybe, I'll have to work on this.
- >I'll post to the net if I can find the reasons for the problem or
- >ways to work around it anyway.
-
- Today, I don't see what made me post that a working around the
- problem by swapping the array descriptors won't work. I found
- that it works perfectly. Instead of the swap command, you can
- use:
-
- PROCEDURE swapstrarr(VAR p_x%,y$())
- LOCAL p_y%,arrbase_x%,arrbase_y%,anzdim_x&,anzdim_y&
- p_y%=*y$()
- arrbase_x%={p_x%}
- anzdim_x&=INT{p_x%+4}
- arrbase_y%={p_y%}
- anzdim_y&=INT{p_y%+4}
- SWAP arrbase_x%,arrbase_y%
- SWAP anzdim_x&,anzdim_y&
- {p_x%}=arrbase_x%
- INT{p_x%+4}=anzdim_x&
- PRINT {p_x%+4},anzdim_x&
- {p_y%}=arrbase_y%
- INT{p_y%+4}=anzdim_y&
- RETURN
-
- At least, this seems to do the trick for me now.
-
- Greetinx, Jan
-
- +- Jan Kim -- X.400: S=kim;OU=vax;O=mpiz-koeln;P=mpg;A=dbp;C=de -+
- | Internet: kim@vax.mpiz-koeln.mpg.dbp.de |
- | |
- *----=< hierarchical systems are for files, not for humans >=-----*
-