OpenSTA logo OpenSTA SCL Reference
Character Strings

Character Strings

SCL character strings provide the ability of specifying text data of an undetermined length - that is the actual storage contains information of how long the specified text is. When literally specified in the code a character string is referred to as a quoted character string, these may be used as parameters to commands or functions, or assigned to character variables or constants. Some commands can take parameters as character expressions allowing limited character string manipulation on the fly.

Any ASCII character can be contained within a character string but special syntax may be required to represent certain characters, (ie. non-printing ones). For example, the character string ~<07> always represents a single character (namely the character with a value of 0x07), not five characters.

Quoted Character Strings are sequences of ASCII characters surrounded by quote characters. The quote character used can be the single (') or double (") quote but the string is only terminated by a quote character matching the starting quote character.

A quoted character string is continued onto another line by closing it at the end of the line and reopening it on the next. Opening and closing quotes must match on any one line, as shown in the following example:

LOG "This string of text is continued " &
	'over two lines.'
LOG "This message contains a variable ", Var1, &
	' and is continued on this line ', &
	Var2, ' and this line' &
	' and this line'

Some commands allow Character Expressions to be used as parameters. This means a single parameter can be represented with character variables and/or quoted strings, these are combined using + and - operators like their use in the SET command. The example below illustrates one possible use of this technique:

GET URI "http://" + Host-Name + "/~~dansut/ HTTP/1.0" ON 1 &
	HEADER Sub-Head &
	,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg", &
		"Host: " + Host-Name, &
		"Connection: Keep-Alive"}

Note: Single quotes may be included in character strings by using double quotes for the string delimiters, and vice versa.


<<<
prev page
^^^
section start
>>>
next page