beautypg.com

Visara Master Console Center Scripting Guide User Manual

Page 112

background image

Chapter 5 Script Commands

Scripting Guide

112

$Return := FORMATSTR( "The value is: %10d.", %Value2 )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=The value is: 3.

$Return := FORMATSTR( "The value is: %.10d.", %Value2 )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=The value is: 0000000003.

$Return := FORMATSTR( "The value is: %-*d.", %Value,
%Value2 )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=The value is: 3 .

$Return := FORMATSTR( "Alert Received from %s.",
$MyString )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Alert Received from UNIX Console 22.

$Return := FORMATSTR( "Value is %d, string is %s.",
%Value, $MyString )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Value is 10, string is UNIX Console 22.

$Return := FORMATSTR( "Integer %d is ASCII %c, integer %d
is ASCII %c.", 65, 65, 97, 97 )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Integer 65 is ASCII A, integer 97 is ASCII a.

$Return := FORMATSTR( "Integer %d is hex %#X.", %Value,
%Value )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Integer 10 is hex 0XA.

$Return := FORMATSTR( "Integer %d is hex %#x.", %Value,
%Value )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Integer 10 is hex 0xa.

$Return := FORMATSTR( "Integer %d is hex %#.5X.", %Value,
%Value )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Integer 10 is hex 0x0000A.

$Return := FORMATSTR( "Integer %d is hex %#.*X.", %Value,
%Value, %Value )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Integer 10 is hex 0x000000000A.

$Return := FORMATSTR( "Integer %d is octal %#o.", %Value,
%Value )
LOG( LOG_EXEC, $Return, 12 )
OUTPUT=Integer 10 is octal 012.

See Also:

N/A