stringfield question.
Posted: Sat Oct 12, 2024 5:58 am
i have this string.
mystring = ButtonGadget(#Button_0, 20, 30, 100, 25, "Button 0")
i want to split it up.
first i use stringfield(mystring, 1,"(") and i get what i expect "ButtonGadget("
> next instruction is stringfield(mystring, 1,",") and i get this "ButtonGadget(#Button_0" <
next instruction is stringfield(mystring, 2,",") and i get "20"
next instruction is stringfield(mystring, 2,",") and i get "30"
next instruction is stringfield(mystring, 2,",") and i get "100"
next instruction is stringfield(mystring, 2,",") and i get "25"
the line between > < is confusing me, or maybe it is the lines after.
what i men is the last 4 lines seem to be "pop" off the front of the line except for the line with > <
does the function return only what is between the delimiters?
this first line is between the start and the delimiter, [buttongadget]
the next line also is between the start and the delimiter [ButtonGadget(#Button_0"]
the rest are all between the delimiter of "," and are given as is.
is this right? I was pretty confused until i started to explain it. I am still a little unsure.
actual procedure is below. I am still new so it looks pretty rough.
goodnight, past my bed time.
Fred
mystring = ButtonGadget(#Button_0, 20, 30, 100, 25, "Button 0")
i want to split it up.
first i use stringfield(mystring, 1,"(") and i get what i expect "ButtonGadget("
> next instruction is stringfield(mystring, 1,",") and i get this "ButtonGadget(#Button_0" <
next instruction is stringfield(mystring, 2,",") and i get "20"
next instruction is stringfield(mystring, 2,",") and i get "30"
next instruction is stringfield(mystring, 2,",") and i get "100"
next instruction is stringfield(mystring, 2,",") and i get "25"
the line between > < is confusing me, or maybe it is the lines after.
what i men is the last 4 lines seem to be "pop" off the front of the line except for the line with > <
does the function return only what is between the delimiters?
this first line is between the start and the delimiter, [buttongadget]
the next line also is between the start and the delimiter [ButtonGadget(#Button_0"]
the rest are all between the delimiter of "," and are given as is.
is this right? I was pretty confused until i started to explain it. I am still a little unsure.
actual procedure is below. I am still new so it looks pretty rough.
Code: Select all
Procedure processLoc(List thisList.s())
localtemp.s = LTrim(thislist.s())
Debug localtemp.s
localtemp1.s = LTrim(StringField(localtemp.s, 1 ,"#"))
Debug localtemp1.s
localtemp2.s = LTrim(StringField(localtemp.s, 1 ,","))
Debug localtemp2.s
localtemp3.s = LTrim(StringField(localtemp.s, 2 ,","))
Debug localtemp3.s
localtemp4.s = LTrim(StringField(localtemp.s, 3 ,","))
Debug localtemp4.s
localtemp5.s = LTrim(StringField(localtemp.s, 4 ,","))
Debug localtemp5.s
localtemp6.s = LTrim(StringField(localtemp.s, 5 ,","))
Debug localtemp6.s
; ButtonGadget(#Button_0, 20, 30, 100, 25, "Button 0")
EndProcedure
goodnight, past my bed time.
Fred