beautypg.com

N* (repeat function n times) – National Instruments GPIB-PC User Manual

Page 204

background image

IBIC

Section Five

GPIB-PC User Manual

5-16

©National Instruments Corp.

n*

(Repeat Function n Times)

The

n*

function repeats the execution of the specified function

n

times,

where

n

is an integer. In the following example, the message

Hello

will be sent to the printer five times.

Example:

printer:

5*ibwrt "Hello"

The function name can be replaced with the

!

function. Thus, if this

example is done the following way, the word

Hello

will be sent 20

more times, then 10 more times.

Example:

printer:

printer:

20* !
10* !

Notice that the multiplier (

*

) does not become part of the function

name; that is,

ibwrt "Hello"

is repeated 20 times, not

5* ibwrt

"Hello"

.