LB Booster
« Compatibility problem »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 03:29am



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  Notify Send Topic Print
 thread  Author  Topic: Compatibility problem  (Read 201 times)
mmiscool
New Member
Image


member is offline

Avatar




PM


Posts: 19
xx Compatibility problem
« Thread started on: Jul 24th, 2017, 03:33am »

Running the following code in LB produces different results.

Code:
MYSTRING$ = CHR$(34);"SOME TEXT";CHR$(34);";";CHR$(34);" SOME MORE TXT";CHR$(34)
NOTICE MYSTRING$
NOTICE EVAL$(MYSTRING$) 


I would expect the strings to concatenated with each other in the eval$() function.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Compatibility problem
« Reply #1 on: Jul 24th, 2017, 08:14am »

on Jul 24th, 2017, 03:33am, mmiscool wrote:
I would expect the strings to concatenated with each other in the eval$() function.

No. This is what it says in the LBB help file: "The EVAL function works only with simple expressions containing 'standard' BASIC functions". The use of the semicolon to concatenate strings is far from standard, in fact as far as I know it is unique to Liberty BASIC and Just BASIC.

To make it compatible with LBB you would need to replace the semicolons with the standard means of concatenating strings in BASIC, which is the plus sign:

Code:
MYSTRING$ = CHR$(34)+"SOME TEXT"+CHR$(34)+"+"+CHR$(34)+" SOME MORE TXT"+CHR$(34)
NOTICE MYSTRING$
NOTICE EVAL$(MYSTRING$) 

Richard.
User IP Logged

tsh73
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 210
xx Re: Compatibility problem
« Reply #2 on: Jul 24th, 2017, 08:44am »

It's easy to forget that things you used to are not in fact "standard".
Nice to know that one, thanks.
User IP Logged

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

| |

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