Converts an array of BASIC+ tokens into a string of BASIC+ code that can be compiled. 

Syntax

Code = SRP_String("DetokenizeCode", String, Delim)

Parameters

ParameterDescription
StringA delimited array of BASIC+ tokens. (REQUIRED)
DelimThe delimiter used in String. (OPTIONAL, Default = @FM)

Returns

A single string of BASIC+ code that is formatted correctly for proper compilation.

Remarks

This service takes an array of BASIC+ tokens and converts them into a string that is formatted just enough to be compiled. The formatted output is not designed for human readability since whitespace is only added when necessary. This routine is used by the SRP Precompiler to build compile ready code after analyzing Extended BASIC+ and converting it into Standard BASIC+. Generally speaking, this service isn't much useful without the TokenizeCode service. To use this service, pass your array of tokens into the String parameter, then specify the delimiter in the next parameter.

Delim: This parameter specifies the delimiter used to separate tokens in the given array. If omitted, the default is @FM.

Example

// Sample tokens
Tokens = "A":@FM:"=":@FM:"B":@FM:"+":@FM:"C":@FM:";":@FM:"// This is a simple expression"

// Output will be: "A=B+C;// This is a simple expression"
Code = SRP_String("DetokenizeCode", Tokens)

See Also

TokenizeCode 

 

  • No labels