Hi,
I dont understand the function of (<>"") in BASIC,
Could anyone explain regarding the coding below:
If A$ <>" " Then GOTO Loop
Thank you
<> means not equal to
āā is an empty string
So in if A is not empty you go to loop.
1 Like
To add some clarification it looks like this is copied from the an older version of the programming reference guide with the following code and uses āā not " " as your code example shows.
OPEN "exp:$dtAR $ftT" FOR TEXT INPUT AS 1
Loop:
A$ = Get 1
PRINT A$
If A$ <>"" then GOTO Loop
CLOSE 1
This is looping though the file loading a new line and then actually checking if it is not an empty string. If it is not an empty string it goes back to the start of the loop. If it does it will close.
Deryck
1 Like
Thank you for the explanation
Appreciate it