Now I found a somewhat solution.
Not a spectacular thing but at least stored here...
Code: Select all
EnableExplicit
#Namespace_Base = 16
#Namespace_Native = 32
#Type_String = 32
Structure SAny
Namespace.w
Type.w
EndStructure
Structure SString extends SAny
Value.s
EndStructure
define S1.s = " Test for a string 1" ; 2 spaces are important!!!
define *S2.SString = AllocateStructure(SString)
*S2\Namespace = #Namespace_Base
*S2\Type = #Type_String
*S2\Value = "Test for a string 2"
Procedure checkString(*S.SString)
if *S\Namespace=32 and *S\Type=32
debug mid(PeekS(*S), 3)
else
Debug *S\Value
endif
EndProcedure
checkString(@S1)
checkString(@" test")
checkString(*S2)
Now, the rule is: put two spaces at beginning and handling gets nearly the same.
And it does only work with unicode (or type/namespace must be .b).