| Chr | Strings |
Declaration:
FUNCTION Chr
( v:INTEGER ) :CHAR ; Description:
Function Chr returns the ASCII character corresponding to the specified numeric code. The ASCII code value must be between 1 and 255.
Parameters:
v ASCII numeric identifier code. Example:
PROCEDURE Example; VAR cnt :INTEGER; str :STRING; BEGIN FOR cnt := 128 TO 255 DO BEGIN str := Concat(str, Chr(cnt)); IF cnt MOD 32 = 0 THEN str := Concat(str, Chr(13)); END; AlrtDialog(str); END; RUN(Example);See Also:
Ord
| Concat | Strings |
Declaration:
FUNCTION Concat
( txt :DYNARRAY[] of CHAR ) :DYNARRAY[] of CHAR ; Description:
Function Concat combines, or concatenates, all the specified parameters in order and returns the resultant string.
Example:
newStr:=Concat('A','sample','string');
| Copy | Strings |
Declaration:
FUNCTION Copy
( source :DYNARRAY[] of CHAR; index :INTEGER; count :INTEGER ) :DYNARRAY[] of CHAR ; Description:
Function Copy returns a substring from a specified source string.
Parameters:
source Source string. index Start position in text string. count Length of substring. Example:
newStr:=Copy('A sample string',10,6); {returns 'string'}
| Delete | Strings |
Declaration:
PROCEDURE Delete
( VAR source :DYNARRAY[] of CHAR; index :INTEGER; count :INTEGER ) ; Description:
Procedure Delete removes a substring from the specified source string.
Parameters:
source Source string. index Start position in text string. count Length of substring. Example:
theStr:='A sample string'; Delete(theStr,3,7); {deletes 'sample' from the string value}
| GetResourceString | Strings |
Declaration:
PROCEDURE GetResourceString
( VAR theString :STRING; id :INTEGER; index :INTEGER ) ; Description:
Returns the specified resource string from a resource file.Parameters:
theString The string contained within the resource. id The ID of the resource. index The index of the string resource. See Also:
SetVSResourceFile
| Insert | Strings |
Declaration:
PROCEDURE Insert
( source :DYNARRAY[] of CHAR; VAR dest :DYNARRAY[] of CHAR; index :INTEGER ) ; Description:
Procedure Insert will insert the specified string into a destination string.Parameters:
source String to be inserted. dest Destination string. index Position where string is to be inserted. Example:
theStr:='sample'; originalStr:='A string'; Insert(theStr,originalStr,3); {inserts 'sample' into the target string}
| Len | Strings |
Declaration:
FUNCTION Len
( v:DYNARRAY[] of CHAR ) :INTEGER ; Description:
Function Len returns the length of the specified string value.Parameters:
v Source string.
| Num2Str | Strings |
Declaration:
FUNCTION Num2Str
( decPlace :INTEGER; v :REAL ) :STRING ; Description:
Function Num2Str converts a REAL value to a string and returns the value.
Parameter decPlace has a range of -1 to 9; if -1 is specified, the value will be returned in scientific notation.
Parameters:
decPlace Number of decimal places. v Numeric value. Example:
oldnumValue:=232.5148; newStrValue:=Num2Str(3,oldnumValue); {would return '232.515'}
| Num2StrF | Strings |
Declaration:
FUNCTION Num2StrF
( vDistance:REAL ) :STRING ; Description:
Function Num2StrF converts a specified REAL value into a string. The numeric value will be converted and displayed in the current unit settings of the drawing.
Parameters:
vDistance Numeric value. Example:
oldnumValue:=23.45; newStrValue:=Num2StrF(oldnumValue); {would return 1'-11 1/2"}
| Ord | Strings |
Declaration:
FUNCTION Ord
( v:CHAR ) :INTEGER ; Description:
Function Ord returns the corresponding ASCII number of the specified character value. Parameter Ord specifies the character.
Parameters:
v ASCII character. Example:
PROCEDURE Main; VAR str :STRING; cnt :INTEGER; BEGIN str := GetText(FSActLayer); FOR cnt := 1 TO Len(str) DO AlrtDialog(Concat(Ord(Copy(str, cnt, 1)))); END; RUN(Main);See Also:
Chr
| Pos | Strings |
Declaration:
FUNCTION Pos
( subStr :DYNARRAY[] of CHAR; str :DYNARRAY[] of CHAR ) :INTEGER ; Description:
Function Pos searches for a specified substring contained within in a target string.
Pos returns the position of the substring. If the string is not found, 0 is returned.
Parameters:
subStr Substring to be located. str Target string. Example:
Loc:=Pos('samp','A sample string');
| Str2Num | Strings |
Declaration:
FUNCTION Str2Num
( s:STRING ) :REAL ; Description:
Function Str2Num returns the specified string as a numeric value.Parameters:
s Source string. Example:
numValue:=Str2Num('235.44');See Also:
ValidNumStr
| UprString | Strings |
Declaration:
PROCEDURE UprString
( VAR str:DYNARRAY[] of CHAR ) ; Description:
Procedure UprString converts all characters in the specified string to upper case.
Parameters:
str Source string. Example:
revisedString := 'vectorworks'; UprString(revisedString); {Sets revisedString equal to 'VECTORWORKS'}