Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Here's Print Using Mismatch error
#3
You get a missmatch because you provide more values than you designate in the format string.
Code: (Select All)
DIM formatString AS STRING
formatString = "##.## & ##.## &" 'num;str;num;str
FOR i = 0 TO 9
    'Print Using "##.##"; i / 10; "-"; (i + 1) / 10; " |";
    PRINT USING formatString; i / 10; "-"; (i + 1) / 10; " |";
    FOR j = 1 TO freq(i) / 10
        PRINT "*";
    NEXT j
    PRINT
NEXT i
This works.

BTW you don's see the stars printet here, because the freq() array/function is not defined in this example, hence the J loop will evealuate 1 TO 0 and so never is performed.
Reply


Messages In This Thread
Here's Print Using Mismatch error - by Dimster - 01-13-2024, 06:47 PM
RE: Here's Print Using Mismatch error - by bplus - 01-13-2024, 07:40 PM
RE: Here's Print Using Mismatch error - by RhoSigma - 01-13-2024, 07:45 PM
RE: Here's Print Using Mismatch error - by bplus - 01-13-2024, 07:52 PM
RE: Here's Print Using Mismatch error - by bplus - 01-13-2024, 08:47 PM



Users browsing this thread: 3 Guest(s)