Kernel.bdh
GetString( in sSource : string, in nPos : number, out sDest : string, in nDestSize : number ): boolean;
true if successful
false = string to copy terminated or failure
Parameter | Description |
---|---|
sSource | Source string |
nPos | Specifies the position to copy from in sSource, where the first position is 1 (not 0) |
sDest | Destination string |
nDestSize | Maximum number of characters to copy |
dcltrans transaction TGetString const SIZE_STRUCT := 32; var myBDLstring : string(SIZE_STRUCT); sString : string(9); bOk : boolean; begin SetString(myBDLstring, 22, "hello"); // Copy a string from myBDLstring starting at position 22 // into sString and thereby (through mapping)get // the element myString in Struct1 bOk := GetString(myBDLstring, 22, sString,STRING_COMPLETE); write("myString = "); write(sString); writeln; end TGetString;
myString = hello