Numtostr function – Multichannel Systems NeuroExplorer User Manual

Page 312

Advertising
background image

5.5.14.6. NumToStr Function

NumToStr Function


Converts number to string using optional format string.

Syntax


string NumToStr(number, formatString)

Parameters

Parameter

Type

Description

number

double

Number to be converted to string.

formatString

string

Optional format string (a standard C/C++ format
specifier).
See, for example,

http://www.cplusplus.com/reference/clibrary/cstdio/p

rintf/

Returns


Returns string representing the specified number.

Comments


None

Usage

NexScript


For example, to generate strings:


Event001, Event002, ..., Event016


use the following loop

for i=1 to 16

str = "Event0" + NumToStr(i, "%02.0f")

end

See Also

Introduction to NexScript Programming

NexScript Function Categories

Page 310

Advertising