overlaying question 
Author Message
 overlaying question

' in pb35 for dos:

dim gfxstr(0) as shared string * 26
dim absolute gfx(25) as shared byte at varseg(gfxstr$(0))

' by dimensioning as such, if I ...

gfxstr$(0)="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
for x=0 to 25
  print gfx(25);
next x

' would give me the result

 65  66  67  68 .... 87  88  89  90

my question is this, how would this be done in PBCC2.0?

thanks
fred



Fri, 26 Sep 2003 16:18:54 GMT  
 overlaying question

Quote:
> gfxstr$(0)="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
> for x=0 to 25
>   print gfx(25);
> next x

> ' would give me the result

>  65  66  67  68 .... 87  88  89  90

Did you mean

print gfx(x);

in line three above?  If not, I don't see how that works.  In any case the
following should work:

dim gfx(25) as global byte at varptr(gfxstr$(0))

Tom Lake



Fri, 26 Sep 2003 17:06:08 GMT  
 overlaying question


Quote:
>> gfxstr$(0)="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>> for x=0 to 25
>>   print gfx(25);
>> next x

>> ' would give me the result

>>  65  66  67  68 .... 87  88  89  90

>Did you mean

>print gfx(x);

correct  (oops)

Quote:

>in line three above?  If not, I don't see how that works.  In any case the
>following should work:

>dim gfx(25) as global byte at varptr(gfxstr$(0))

don't work, error at compilation.


Sat, 27 Sep 2003 04:02:01 GMT  
 overlaying question
' I figured it out :)

#DIM ALL
FUNCTION PBMAIN()
   DIM gfxstr AS ASCIIZ * 27
   DIM gfx(25) AS BYTE AT VARPTR(gfxstr$)
   DIM x AS LONG
   gfxstr$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
   FOR x=0 TO 25
       PRINT gfx(x);
   NEXT x
   PRINT gfxstr$
   WAITKEY$
END FUNCTION



Mon, 29 Sep 2003 15:59:23 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Is overlaying useful?

2. overlaying bitmaps

3. plot overlaying

4. Overlaying of methods.

5. Overlaying a wireframe model on a video stream

6. Overlaying classes

7. overlaying of widget

8. Questions-Questions-Questions-Answers-Answers

9. Question(Questions, questions...)

10. Newbie Question: Realbasic Question

11. Questions Questions

12. Questions and more questions...

 

 
Powered by phpBB® Forum Software