Core Function LineInfo

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "<pre> LineInfo( ) </pre> === Description === Get a vast amount of *behind the scene* information the current line of source code being executed. === Return Value === Success:...")
 
(Example)
 
Line 18: Line 18:
  
 
=== Example ===
 
=== Example ===
 +
 +
Note I used LineInfo with a bit more stuff commented out above it so thats why the line is saying 6 instead of 2.
  
 
<syntaxhighlight lang="sputnik">
 
<syntaxhighlight lang="sputnik">

Latest revision as of 09:45, 21 June 2015

LineInfo( )

Contents

Description

Get a vast amount of *behind the scene* information the current line of source code being executed.

Return Value

Success: Returns an array of information.

Failure: Returns null.

Remarks

More information will be added as time goes by but the array should remain in same format and provide the same info in future versions so it should be safe to rely on it.

Example

Note I used LineInfo with a bit more stuff commented out above it so thats why the line is saying 6 instead of 2.

// Get the line info
printr LineInfo();
// Array
// (
//     [SymbolName] => Normal Stm
//     [SymbolKind] => 0
//     [SymbolKindStr] => Nonterminal
//     [SymbolXmlName] => NormalStm
//     [SymbolIndex] => 199
//     [SymbolInfo] => <Normal Stm>
//     [PositionFileName] => f:\sputnik\bin\main.spk
//     [PositionColumn] => 1
//     [PositionIndex] => 72
//     [PositionLine] => 6
//     [PositionLineText] => printr LineInfo();
//     [PositionText] => printr
//     [PositionInfo] => 6:1
// )
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox