April 18, 2024, 09:12:43 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


IWBasic User's Guide - Error in Float Example

Started by Logman, August 19, 2015, 10:11:52 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Logman

August 19, 2015, 10:11:52 AM Last Edit: August 20, 2015, 06:16:38 AM by Logman
Click on the HELP menu and then select IWBasic User's Guide.

In the User's Guide select GENERAL PROGRAMMING > FILE OPERATIONS > WRITING TO THE FILE in the TOC

Regarding the 6th code example:


DEF myfile as FILE
DEF fNum as FLOAT
fNum = 3453423.3423
IF OPENFILE(myfile, "C:\\temp\\temp.txt", "W") = 0
   WRITE myfile, iNum
   CLOSEFILE myfile
ENDIF


The example makes the DEF fNum as FLOAT statement and then sets fNum = 3453423.3423.

But then on the 5th line the example shows an integer variable not defined in the example > "i.e. iNum" to be written out to the file. iNum needs to be changed to fNum.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!

LarryMc

thanks for reporting the error -- correction made and will appear in next update.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Logman

Thanks Larry.

I know some of these reported errors are nit-picky, but to new users they may seem confusing.

Logman
Education is what you get when you read the fine print.<br />Experience is what you get when you don't!