I'm using QB64 version 1 on Windows 7 Professional SP1 Intel Xeon CPU E31245 3.3GHz
The following results in a type mismatch on line 3. Why?
x1 = 1543.238
tmp$ = "\ \"
PRINT USING tmp$; x1;
I really need to write to a file but cannot even get it to work on the screen.
I have several columns and rows of variable length figures to output to a file which I need to line up for readability with the headings. I have tried all sorts of configurations for this.
Any suggestions?
Thanks, Nigel
QB64 Print Using "\ \"
- burger2227
- Veteran
- Posts: 2466
- Joined: Mon Aug 21, 2006 12:40 am
- Location: Pittsburgh, PA
Re: QB64 Print Using "\ \"
You must use # digits instead to create string numbers in the template.
"\ \" is used for string values cut off over spaces + 2 for the \characters. IE it will not show longer strings fully.
template$ = "$$######,.##" ' sets $ sign to start of number with comma thousands and decimal point
See chart of USING character formats
USING also rounds decimal point values up like CINT to values according to decimal places desired.
"\ \" is used for string values cut off over spaces + 2 for the \characters. IE it will not show longer strings fully.
template$ = "$$######,.##" ' sets $ sign to start of number with comma thousands and decimal point
See chart of USING character formats
USING also rounds decimal point values up like CINT to values according to decimal places desired.
Please acknowledge and thank members who answer your questions!
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0
QB64 is a FREE QBasic compiler for WIN, MAC(OSX) and LINUX : https://www.qb64.org/forum/index.php
Get my Q-Basics demonstrator: https://www.dropbox.com/s/fdmgp91d6h8ps ... s.zip?dl=0