SourcePoint Intel Help

Table of Contents

sprintf

Write formatted output to an nstring variable.

Syntax

[result =] sprintf(nstring, format [, expr [ ,...] ] )

Where:

result

specifies a debug object of type ord4 to which the return value is assigned. ย If result is not specified, the return value is displayed on the next line.

nstring

is an nstring debug variable.

format

is a quoted string of characters that determines the format of the display. The format can contain two types of characters: ordinary characters and conversion specification characters.

expr

is an expression that is evaluated and displayed.

Discussion

Use the sprintf function to write formatted output to an nstring debug variable. ย The sprintf function is similar to the C-language sprintf routine. ย See printf for more information. The value returned is the number of characters of output generated.

Example

Command input:

define ord4 dummy

define nstring mystring

define ord4 o4test = 3

dummy = sprintf(mystring, "this is test #%d", o4test)

mystring

Result:

this is test #3

Related Topics: