User Tools

Site Tools


prime:misctips

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
prime:misctips [2017/10/29 18:57]
webmasterpdx
prime:misctips [2017/11/15 23:17] (current)
webmasterpdx
Line 1: Line 1:
 ====== Miscellaneous Tips ====== ====== Miscellaneous Tips ======
 +
 +Integers are defined using the following formats. #19d is 19 decimal. #19Dh is 19D hex. #19:16d is 19 decimal 16 bits. #19D:16h is 19D hex 16 bits. Note the use of upper and lower case. More info [[https://​carlos-icg.blogspot.pe/​2017/​09/​entero-tipo-hp-prime.html|here]].
 +
 +LOCAL A; inside a program file, but outside a function definition, is a global variable that only functions defined inside the same program file can access. Thus, LOCAL A; will not compile as long as the variable A exsits globally (e.g. System variable A is a predefined global). i.e. LOCAL A; outside a function does not do any variable overloading.
 +
 +Variable names can use all kinds of weird identifiers defined in unicode. To determine what identifiers (non-alphanumeric type characters),​ a little C function to do that is identified [[http://​www.hpmuseum.org/​forum/​thread-9495-post-83371.html#​pid83371|here]].
  
 Note that there is a shortcut to STRING(V) by just doing T:​=""​+V;​ However, STRING(V) is faster and uses less RAM. Note that there is a shortcut to STRING(V) by just doing T:​=""​+V;​ However, STRING(V) is faster and uses less RAM.
 +
 +When a variable is passed into a function, it's passed by value, so any changes to make to the variable will not be reflected in the variable passed in. You need to return the variable and assign it in the calling function to change it there.
  
 When a loop must execute at least once, use REPEAT, otherwise use WHILE. When a loop must execute at least once, use REPEAT, otherwise use WHILE.
 +
 +To get a single character from a string, S, there are several ways. S(3) returns an ASCII code. CHAR(S(3)) will return it as a string like "​e"​. S(3,1) returns a one character substring as in "​e"​. ASC(S(3,1)) is the same as S(3).
 +
 +The \ character is generated from the Shift-Vars/​Chars key. It's on the first page of characters.
 +
 +Screen real estate is as follows.
 +  * (0,​0,​319,​18) ​   Top Status Area, including border line at the bottom.
 +  * (0,​19,​319,​201) ​ Main Work area of the screen.
 +  * (0,​202,​319,​219) Input Area at bottom of screen, above the menu bar.
 +  * (0,​220,​319,​239) Menu Bar at the bottom of the screen.
 +  * (0,​0,​319,​239) ​  Total Screen Rectangle.
  
 When plotting a function where f(x) is complex over an interval, the graph will appear blank during that interval, as you cannot plot a complex value when there is only a real y-axis. Get the magnitude of the complex value and plot that instead. When plotting a function where f(x) is complex over an interval, the graph will appear blank during that interval, as you cannot plot a complex value when there is only a real y-axis. Get the magnitude of the complex value and plot that instead.
 +
 +Use L(0) to index the tail of a list. To concatenate to a list, you can do something like L:​={4,​9,​16};​L(0):​=√(L);​
 +That would result in L being {4,​9,​16,​2,​3,​4}.
  
 Indefinite integral has an implicit "+ constant"​ at the end of the results. In some CAS systems it's mentioned, but in the PRIME, it isn't. Note that this is so the result can be cut and pasted without having to delete the extra text, which is preferred. The constant is eliminated when the limits are provided for the definite integral. Note that the preval() function calculates f(b)-f(a), when called like preval(f,​a,​b[,​var]),​ which can be used to get the definite integral from the indefinite integral. Indefinite integral has an implicit "+ constant"​ at the end of the results. In some CAS systems it's mentioned, but in the PRIME, it isn't. Note that this is so the result can be cut and pasted without having to delete the extra text, which is preferred. The constant is eliminated when the limits are provided for the definite integral. Note that the preval() function calculates f(b)-f(a), when called like preval(f,​a,​b[,​var]),​ which can be used to get the definite integral from the indefinite integral.
prime/misctips.1509328677.txt.gz · Last modified: 2017/10/29 18:57 by webmasterpdx