Page 1 of 1

Pointer to string of string list?

Posted: Wed May 16, 2018 10:25 am
by Lebostein
Pointer to a single string or a string in a structured list works. But how I get the pointer to a string of a string list?

Code: Select all

Procedure StringCheck(*string)

  *buffer.character = *string
  Debug *buffer\c

EndProcedure

test$ = "ABC"
StringCheck(@test$)
; = 65 = OK

Structure xxx
  test.s
EndStructure
NewList mylist1.xxx()
AddElement(mylist1())
mylist1()\test = "ABC"
StringCheck(@mylist1()\test)
; = 65 = OK

NewList mylist2.s()
AddElement(mylist2())
mylist2() = "ABC"
StringCheck(@mylist2())
; = 2208 = wrong, pointer to list element?

Re: Pointer to string of string list?

Posted: Wed May 16, 2018 11:15 am
by nco2k
StringCheck(PeekI(@mylist2()))

c ya,
nco2k