TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: ALL
from: REINIER ZWITSERLOOT
date: 1998-05-19 15:20:00
subject: Re: CODEPTR32

From: Reinier Zwitserloot 
Subject: Re: CODEPTR32
 
Good question! However, in this case you might wnana use
CHR$(5,1,2,3,4,5)  and refer to it using VARPTR32.
 
What exactly is your code supposed to do? What you have there simply
loads all the byte values in the $INLINE statement in the X? byte
variable and immediately discarding the contens as they are loaded over
on the next for|next loop. One question... the @Data_PTR[Idx%] notation
(with the [Idx%] index ref. behind it) is not available in PB v3.2 (only
in 3.5), right?
 
Don Schullian wrote:
>
> Hi,
>
>   I came across an idea today and thought that it could be useful in 
ertain
> instances!
>
> DIM Data_PTR AS BYTE PTR
>
> Data_PTR = CODEPTR32( "MyData" )
> Last%    = @Data_PTR
>
> FOR Idx% = 1 TO Last%
>   X? = @Data_PTR[Idx%]
> NEXT
>
> END
>
> MyData:
>   $INLINE 5, 1, 2, 3, 4, 5
>
> Now, the question is....
>
> If, instead of using $INLINE I use DATA, the pointer doesn't seem to point 
to
> the data itself. Where _IS_ it pointing?
>
> TIA,
>
>   ____    _    ____      ____  _____
>  |  _ \  / \  / ___) __ | ___)(_   _)
>  | |_)  / _ \ \____\/  \|  _)   | |
>  |____//_/ \_\(____/\__/|_|     |_|
>     Reply to: d83@ath.forthnet.gr
>      www.basicguru.com/schullian
 
--
- Ray Zwitserloot.
 
R.Zwitserloot@antispam.BTInternet.com
 Change the E-mail address to reply!
 
----------------------------------------------------
 
*** QwkNews (tm) v2.1
 * [TN71] alt.lang.powerbasic  POWER_BAS Gateway
--- GEcho 1.20/Pro
---------------
* Origin: Toast House Remote (1:100/560.2)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.