Copies an unsigned short value (2-byte unsigned integer value) into a data structure at a specified position. You must declare a BDL string before using this function.
Kernel.bdh
SetUShort( inout sString :string, in nPos : number, in nShort : number, in nByteOrder : number optional ): boolean;
true if successful
false otherwise
| Parameter | Description | 
|---|---|
| sString | BDL string corresponding to the data structure | 
| nPos | Insert position in the BDL string, where the first position is 1 (not 0) | 
| nShort | Unsigned short value | 
| nByteOrder | 
                           
                            Specifies the byte order that is applied when a value is set (optional). This parameter can be one of the following: 
  | 
                        
                     
dcltrans transaction TSetUShort const SIZE_STRUCT := 32; var myBDLstring : string(SIZE_STRUCT); bOk : boolean; begin // Set a 2-byte unsigned character at position 20 // in the BDL string myBDLstring and thereby (through mapping) set // the element myUShort in Struct1 bOk := SetUShort(myBDLstring, 20, 64000); if bOk then write("myUShort successfully set to 64000");writeln; else write("error setting myUShort"); writeln; end; end TSetUShort;
myUShort successfully set to 64000