LB Booster
« Random Access Procedures »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 05:00am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Random Access Procedures  (Read 107 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Random Access Procedures
« Reply #18 on: Oct 23rd, 2015, 9:32pm »

on Oct 23rd, 2015, 7:19pm, pnlawrence wrote:
LB reports a syntax error in the open line and LBB just says "Mistake!"

It may be that you have previously used another language which allows a function to be called without assigning the returned value to anything, but Liberty BASIC doesn't. If you want to call a function, but ignore the value it returns, you must assign it to something, for example:

Code:
    ignoreThis = openRAF(path$,fileName$,fileHandle$,recordLen) 

Richard.
User IP Logged

joker
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 157
xx Re: Random Access Procedures
« Reply #19 on: Oct 24th, 2015, 09:51am »

Now, there's a difference between SUB and FUNCTION that I missed. Thanks!
« Last Edit: Oct 24th, 2015, 09:51am by joker » User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Random Access Procedures
« Reply #20 on: Oct 24th, 2015, 10:40am »

on Oct 23rd, 2015, 9:32pm, Richard Russell wrote:
If you want to call a function, but ignore the value it returns, you must assign it to something

I occasionally use this construction, to avoid creating a dummy variable, but it's a bit ugly (and relies on a 'feature' of LB/LBB that rem and ' are not always equivalent):

Code:
    if openRAF(path$,fileName$,fileHandle$,recordLen) then rem 

Richard.

User IP Logged

Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »


This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls