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
Programming
'''SMath Studio''' has several programming commands, so you can write procedures. Besides what is below, there are also '''Tutorials on programming in SMath Studio: [{UP}Tutorials%2fProgrammingWithSMathStudio.pdf|pdf] | [{UP}Tutorials%2fProgrammingWithSMathStudio.zip|zip] ''' These are '''[[if]]''','''[[for]]''', '''[[while]]''' and '''[[line]]'''. ==[anchor|#Examples]Examples== [image|programming|{UP}userfunchints/ifforlinewhile.png] Take care that some complicated programming structures are not implemented. ==[anchor|#The_Need_for_Speed]The Need for Speed!== {BR}'''If your loops are running too slowly use [[eval]] to speed them up.''' I've got one program that is 500 times faster using eval. '''You can often gain a speedup by setting the Optimization mode to Numeric''' as follows: 1. Let's start with nothing selected: [image|Nothing selected|{UP}Programming/Optimization_Numeric_1_nothing_selected.png] 2. Left-click anywhere on the loop in question. <esc> </esc>The loop will be surrounded by a selection box: [image|Selection box|{UP}Programming/Optimization_Numeric_2_after_left-click.png] 3. Right-click anywhere on the loop. <esc> </esc>The context menu will now have a setting for Optimization. <esc> </esc>Set this to "Numeric." <esc> </esc>The Optimization setting automatically applies to all operations within the selection box. [image|Context menu|{UP}Programming/Optimization_Numeric_3_context_menu.png] 4. When you left-click outside the loop, SMath Studio will recalculate the page (if you have main-menu option '''Calculation > Auto calculation''' turned on). <esc> </esc>The calculation will typically be faster than it was with Optimization set to Symbolic.
ScrewTurn Wiki
version 2.0.37. Some of the icons created by
FamFamFam
.