Core Function Scanf

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> Scanf( <expression>, <def> ) </pre> === Description === Parses input from a string according to a format. === Parameters === ==== expression ==== The string to evaluat...")
 
(Example)
Line 30: Line 30:
  
 
<syntaxhighlight lang="sputnik">
 
<syntaxhighlight lang="sputnik">
 +
my $RET = Scanf("X123 Y456", "X%d Y%d");
 +
printr($RET);
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
[[Category:Core Function]]
 
[[Category:Core Function]]

Revision as of 16:16, 22 January 2013

Scanf( <expression>, <def> )

Contents

Description

Parses input from a string according to a format.

Parameters

expression

The string to evaluate.

def

The formation string containing the definition of how to parse the string.

Return Value

Success: Returns array of all captured objects from the parsed string.

Failure: Returns empty array.

Remarks

None.

Example

my $RET = Scanf("X123 Y456", "X%d Y%d");
printr($RET);
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox