ASCIIFIELD

Concept Link IconSee also Concept Link IconExample

Retrieve, from an ASCII buffer, ASCII fields separated by a given character.

WebVue support - Yes.

Mode Mnemonic Syntax
1 LEN 1
2 COUNT 2
3 STR 1
4 INTEGER 1
5 LONG 1
6 DOUBLE 1

The ASCII buffer should be terminated by a linefeed character - either \n or CHR(10).

If you do not terminate the buffer correctly, the last (right-most) field is not recognized.

You cannot enter a linefeed in a Send Text animation.

Syntax 1

RetVal = ASCIIFIELD(Mode, Handle, Index [, Sepa]);

Argument

Meaning

Handle

The handle of the buffer on which the operation is performed. Type LONG.

Index

The index of the field starting at 1. Type INTEGER.

Sepa

The separation character used. The default value is the comma: ",". Type STR.

Execution

Mode

Mnemonic

Action

1

LEN

Return the length of the field specified by the index. If the index is not given, the length (size) of the buffer is returned. Return type: INTEGER.

3

STR

Return the character string of the field specified by the index. If the index is out of range, the character string will be empty. Return type: STR.

4

INTEGER

Return the INTEGER value contained in the field specified by the index. If the index is out of range, the function returns 0. Return type: INTEGER.

5

LONG

Return the LONG value contained in the field specified by the index. If the index is out of range, the function returns 0. Return type: LONG.

6

DOUBLE

Return the REAL value contained in the field specified by the index. If the index is out of range, the function returns 0. Return type: DOUBLE.

Syntax 2

RetVal = ASCIIFIELD(Mode, Handle [, Sepa]);

Return type: INTEGER.

Argument

Meaning

Handle

The handle of the buffer on which the operation is performed. Type LONG.

Sepa

The separation character used. The default value is the comma: ", ". Type STR.

Execution

Mode

Mnemonic

Action

2

COUNT

Return the number of fields in the buffer.

Example

For an example, select the Example link above.