problems with string descriptors in pds 7.1 
Author Message
 problems with string descriptors in pds 7.1

I'm using a function wich receives as parameter a pointer to the string
descriptos. Then it peeks the first two bytes to see the length of the
string
and the third and fourth to know the offset of the data. Then in a FOR
...
NEXT loop, the string is recovered into a string var and assignet to the
function (type string)
It runs OK in QB4.5 but i am changing the progs to PDS 7.1 to use the
CURRENCY type in vars, and this functions does not run
Here you have the source
Thanks in advance
--------------------------------------------------
FUNCTION VARFIELD$ (VARPT%)
UVARPT& = VARPT%: IF VARPT% < 0 THEN UVARPT& = 65536 -
VARPT% ' integer to unsigned
LN& = CLNG(PEEK(UVARPT&) + 256& * PEEK(UVARPT& + 1)) '
len in string descriptor
PTR& = CLNG(PEEK(UVARPT& + 2) + 256& * PEEK(UVARPT& +
3)) ' offset of string data
AUX$ = ""
FOR N% = 0 TO LN& - 1
AUX$ = AUX$ + CHR$(PEEK(PTR& + N%))
NEXT
VARFIELD$ = AUX$
AUX$ = ""
END FUNCTION
------------------------------------------------
where
varpt%=varptr(name$)
and name is a field var
field#1,40 as name$,40 as addres$, ...

is there anything wrong with the descriptor?
I'm usinq qlb's
any idea about far string descriptors?
How are these ones?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Mon, 22 Jul 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Year2K Compliance of Microsoft Basic PDS 7.1 and Consulting Firms specializing in Y2K and PDS 7.1

2. QB 7.1 (sorry - PDS 7.1)

3. Problems with PDS 7.1 ?

4. MS PDS 7.1 Configuration Problem

5. MS Basic PDS 7.1 Problem

6. Mixed-Language PROBLEMS - MS FORTRAN 5.00/Watcom 10.6 and PDS 7.1

7. BASIC PDS 7.1 and problems with PrintScreen -key

8. PDS 7.1 BASIC IF/INSTR problem

9. PDS 7.1 to PowerBasic

10. DLLs in QB 7.1 PDS

11. PDS 7.1 date validation

12. MS PDS 7.1 and ProBas 5.6

 

 
Powered by phpBB® Forum Software