SPRINT function

Purpose:

SPRINT will concatenate a comma separated list of expressions and store them in a string.

Syntax:

SPRINT RetStr AS STRING, comma separated expressions

Parameters:

  • Data type: STRING
    RetStr string containing the concatenation of the comma separated expressions.
  • comma separated expressions A comma separated list of expressions to be concatenated.
    👉 When adding floating point numbers, be sure to specify the data type by appending the type specifier sigil to the end of the number, for example, for a SINGLE 3.14159! and a DOUBLE 3.14159265358979#. Each line of comma separated expressions sent to SPRINT is limited to 2048 bytes.

Example:

DIM RetStr$

SPRINT RetStr$, UCASE$("ATN(1.0) * 4.0"), " is ", ATN(1.0) * 4.0, " is", 3.14159265358979#

PRINT RetStr$

Result:

ATN(1.0) * 4.0 is  3.14159265358979 is 3.14159265358979