Assigns a new value to the byte at the specified index in the string.

Syntax

<oRef>.setByte(<index expN>, <value expN>)

<oRef>

A reference to the String object that you’re using as a structure.

<index expN>

The index number of the byte to set. The first byte is at index number zero.

<value expN>

The new byte value, from 0 to 255.

Property of

String

Description

Strings in dBL are Unicode strings, which use double-byte characters. Use setByte( ) when using a string as a structure that is passed to a DLL function that you have prototyped with EXTERN, to set the values of the bytes in the structure.

The length of the structure string should be one-half the number of bytes in the structure, rounded up. Setting the individual bytes of a Unicode string will most likely cause the string to become unprintable.