STRING Help? - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: STRING Help? (/thread-19954.html) |
STRING Help? - toml_12953 - 05-13-2023 05:24 PM I'm trying to use the STRING function to print a monospaced string. I've read the manual over and over. It could really use more examples! When I try the following, I get Invalid input but I can't see what's wrong. I don't want anything fancy, I just want to print using the current parameters except in a monospaced font. Can someone point me in the right direction? Code: EXPORT Monospace(X) RE: STRING Help? - roadrunner - 05-13-2023 05:46 PM Font size has to be between 0 and 7, you have 10. This works: PRINT(STRING((1/3),0,-1,-1,{50,7,0,0,1})) and prints 0.3 -road RE: STRING Help? - toml_12953 - 05-13-2023 06:00 PM (05-13-2023 05:46 PM)roadrunner Wrote: Font size has to be between 0 and 7, you have 10. This works: Thanks! The manual I have says this on page 635: "You can also specify the font size (10 to 22)" so it looked like the range is 10 - 22. RE: STRING Help? - Didier Lachieze - 05-13-2023 06:12 PM (05-13-2023 06:00 PM)toml_12953 Wrote: The manual I have says this on page 635: The calculator Help is generally more up-to-date than the manual. For STRING it says: Quote:Syntax: RE: STRING Help? - toml_12953 - 05-14-2023 11:04 AM Do the bold, italic and monospaced switches actually work? I don't see a difference when I turn them on or off. RE: STRING Help? - Tim Wessman - 05-14-2023 12:34 PM (05-14-2023 11:04 AM)toml_12953 Wrote: Do the bold, italic and monospaced switches actually work? I don't see a difference when I turn them on or off. Yes, they do work. However this is primarily for calculating the sizing of the string advance (hence you need to take into account the glyph changes for complete accuracy). If you then feed the same printing format into the print function, you will end up seeing the printed output reflect the style. RE: STRING Help? - toml_12953 - 05-14-2023 06:23 PM (05-14-2023 12:34 PM)Tim Wessman Wrote:(05-14-2023 11:04 AM)toml_12953 Wrote: Do the bold, italic and monospaced switches actually work? I don't see a difference when I turn them on or off. Could you give a small example such as I did? |