Skip to content
HPCCSystems Solutions Lab
HPCCSystems Solutions Lab

STRING

STRING data type is a sequence of characters, digits, and special characters including space. STRINGs are wrapped in single quotation (’ ’).

Syntax

STRING[n] attribName
ValueDefinition
STRINGOptional.
[n]Optional, if omitted, the string will store entire value.
attribNameThe name by which the variable will be invoked.

Example



/*
STRING Example:
Examples of defining string values, concatenation, and using them in OUTPUT.
*/

Address := '123 Main Rd, ATL, 30300, USA.';
OUTPUT(Address, NAMED('Address'));

// Defining sting vale with defined length
STRING8 Addr := '123 Main Rd, ATL, 30300, USA.';
OUTPUT(Addr, NAMED('Addr'));

// String concatenation 
STRING FirstName := 'Sun';
STRING LastName  := 'Shine';

OUTPUT(FirstName + ' ' + LastName, NAMED('Concatenation'));
Try Me