Why this does not work ?
cStatuscode := "NNNNNNNNNNNN"
DCGET cStatuscode[1] VALID {|| cStatuscode[1] $ 'YJN' }
DCGET cStatuscode[2] VALID {|| cStatuscode[2] $ 'YJN' }
...
up to 12
DCREAD
The content of cStatuscode ist not changed, no matter what i type (e.g. "J " at postion 6 and 7)
DCGET with string array
Re: DCGET with string array
This does not work in Xbase++ anyway:
Code: Select all
c := "abc"
? c[2] // "b"
c[2] := "f"
? c // "abc"
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCGET with string array
Try this:
Code: Select all
cStatuscode := "NNNNNNNNNNNN"
aStatusCode := {}
FOR i := 1 TO Len(cStatusCode)
aAdd(aStatusCode,cStatusCode[i]
NEXT
DCGET aStatuscode[1] VALID {|| aStatuscode[1] $ 'YJN' }
DCGET aStatuscode[2] VALID {|| aStatuscode[2] $ 'YJN' }
...
DCREAD ...
cStatusCode := ""
FOR i := 1 TO Len(aStatusCode)
cStatusCode += aStatusCode[i]
NEXT
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCGET with string array
It works with LOCALs or STATICs:
Code: Select all
LOCAL c := 'abc'
c[2] := 'f'
? c // 'afc'
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: DCGET with string array
That's interesting. I learned something new.
The eXpress train is coming - and it has more cars.
Re: DCGET with string array

Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."