Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
trace
trace('''var#1''','''var#2''',...,'''var#n''') trace evaluations through the [Output window|Output window]. Returns a string containing the value of the arguments with output order and surrounding text specified by first argument. Specifying of the first text argument is optional. trace(...) it's a function introduced to help users with script's debug. ==Syntax== if '''var#1''' is not a text, trace(...) returns comma separated values {{{{[image|example|{UP}trace%2ftrace_wiki_01.png]}}}} if '''var#1''' is a text, trace(...) returns the string (no other values) {{{{[image|example|{UP}trace%2ftrace_wiki_02.png]}}}} if '''var#1''' is a trace-formatted text, trace(...) returns a string according with '''var#1''' pattern. to show variable values with custom text/order you must insert into curly brackets the trace() ''variable position index''; ''variable position index'' is '''0''' for '''var#2''', '''1''' for '''var#3''', '''2''' for '''var#4''', etc... {{{{[image|example|{UP}trace%2ftrace_wiki_03.png]}}}} {{{{NOTE: curly brackets can be added typing "shift" + "[" for "{" and "shift" + "]" for "}"}}}} trace(...) output can force evaluation, placing before the position index: * '''S:''' for symbolic evaluation * '''N:''' for numeric evaluation {{{{[image|example|{UP}trace%2ftrace_wiki_04.png]}}}} ==Usage== trace() can be used: * directly, like a common function requiring numerical (=) or symbolical (→) evaluation * directly, inside [while|while loops] * directly, inside [for|for loops] (at least one operation must be performed inside the loop) * directly, inside [line|line()] (at least one operation must be performed inside the line()) * inside [User functions|user-defined functions] ==History== * SMath [http://en.smath.info/forum/default.aspx?g=posts&m=6060|0.91] (stable): first relase ==See also== * [Output window|Output window] ==References== * trace syntax tutorial [{UP}trace/trace syntax tutorial.zip|trace syntax tutorial.zip] * trace usage tutorial [{UP}trace/trace usage tutorial.zip|trace usage tutorial.zip]
ScrewTurn Wiki
version 2.0.37. Some of the icons created by
FamFamFam
.