Posts: 2,180
Threads: 222
Joined: Apr 2022
Reputation:
104
08-04-2024, 02:49 PM
(This post was last modified: 08-04-2024, 02:50 PM by Pete.)
(08-04-2024, 02:37 PM)bplus Wrote: I am curious
Code: (Select All)
Print Using "##.##^^^^"; 12345.6789123
What do those "^"'s do?
They are tin foil hats to keep aliens from viewing your output!
Actually: ^^^^ tells PRINT USING to print the answer in exponential format.
Pete
Shoot first and shoot people who ask questions, later.
Posts: 2,180
Threads: 222
Joined: Apr 2022
Reputation:
104
(08-04-2024, 03:03 PM)Kernelpanic Wrote: As Pete has already written. Five ^ results in a three-digit exponent output - but then it's over. Sex is no longer acceptable!
Code: (Select All)
Dim As Double a
a = 12345.6
Print Using "##.##^^^^"; a
Print Using "##.##^^^^"; 12345.6
Print Using "##.##^^^^^"; 12345.6
That's why I avoid PRINT USING, so I don't miss out on 'sex'.
I'm not sure what my latest string math post was, but I think this post included my way to convert to SI without using PRINT USING.
https://qb64phoenix.com/forum/showthread...36#pid5236
Pete
Shoot first and shoot people who ask questions, later.
Posts: 2,180
Threads: 222
Joined: Apr 2022
Reputation:
104
Well guys, the whole idea behind BASIC is to figure out how to code it from scratch. PRINT USING relies on a builtin library, and Jack's neat example is a C library; so you really cannot ascertain matters of complexity when you are not really looking under the hood.
Pete
Shoot first and shoot people who ask questions, later.