So you want to write a SynCalc shortcut? Good for you! Shortcuts are what make SynCalc so useful for any calculation need. This guide will take you through the basics and touch on advanced topics so that you can write your own killer shortcuts!
In order to teach you how to write killer shortcuts, this web page will walk you through several examples which demonstrate all of the shortcut features, tips, and tricks the author of SynCalc could think of. The shortcuts used in this tutorial are included with SynCalc as "SCTutorial.pdb." You should follow along on SynCalc on your own PalmOS device.
The '\n' is a newline, so that the text starts on a new line. So what are those %n things? Well, since the out() function doesn't know automatically where to write out the number, the marker '%n' is used to signify where the number should go in the string. The numeric arguments are subsituted for %n in order from left to right. In this case, the value of 'c' will be substituted for the first %n, and the value of 'Ans' will be substituted for the second %n.
Try using this shortcut, entering 25 for the Cost of Meal, which should produce a tip of $3.75. Therefore, the value 25 will be stored in c, and the Ans will be 3.75. When out() executes, 25 will be written where the first %n is, and 3.75 will be written in place of the second %n. Your console should look like this:
15% tip for a $25 meal is: $3.75
Pretty cool, eh? A few more notes about the out() function:
1) For nice formatting, you can use '\n' for newline and '\t' for tab.
2) The character after the % tells SynCalc which output mode to use. Your choices are the same as for SynCalc's answer: