Jump to content
IGNORED

BASIC XE question


TGB1718

Recommended Posts

I've been playing with BASIC XE as it is much faster than Atari Basic and has more functionality,

however I seem to be having problems with Procedures, I've tried simple ones, but

keep getting runtime errors, I do have the expansion loaded, I see the expansion loading screen when I type CAR

D5:\BASIC>CAR
BASIC XE version 4.1 (C)1985 OSS, Inc
Ready

 

Simple procedure test

 

10 Call "TEST"
20 Stop
30 Procedure "TEST"
40   ? "HELLO"
50 Exit

 

I get this error:- 

Error - 10 at line 10
Expression too Complex

 

Any ideas why ?

 

Link to comment
Share on other sites

1 hour ago, danwinslow said:

As far as I know, you don't put quotes around the procedure name when you define or call it. I don't remember my Basic XE very well, but that's what stands out to me.

No, the quotes are correct.

7 hours ago, TGB1718 said:

10 Call "TEST"

20 Stop
30 Procedure "TEST"
40   ? "HELLO"
50 Exit

 

I get this error:- 

Error - 10 at line 10
Expression too Complex

 

Any ideas why ?

 

My guess would be either you have the wrong version of extensions loaded, or else they did not load properly. You need to be using a DOS that leaves the $C000-$CFFF block free. 

Link to comment
Share on other sites

2 hours ago, Alfred said:

My guess would be either you have the wrong version of extensions loaded, or else they did not load properly.

Second that as it performs correctly here with SDX 4.49g and BASIC XE 4.1 and the corresponding Extensions.

 It is an additional aspect to be watched here: The extensions stay in memory as long as the A8 is not shut down. So doing a cold boot won't kill it.

 

 

Link to comment
Share on other sites

Thanks for the replies, the extensions disk I used was in the same .zip file as the cart file, so I guess

it may be corrupted, will try sourcing the extensions disk elsewhere.

 

I know RENUM works, so some things work, will update later when I get another download.

 

@danwinslow I was using the manual and it uses quotes, apparently you can call your procedures anything

with spaces, so I think quotes would be mandatory.

 

From the manual:- Procedure "Get In Range" Using Min,Max

Link to comment
Share on other sites

OK, now sorted, the download Zip file from AtariMania that has the CAR and Extensions disk has

the wrong disk,  when it loads, it says Version 4.0.

I found version 4.11 following a link on this forum and that works fine.

Also there's a separate extensions disk download on AtariMania, it doesn't say what version it is

and when I ran it, no version shows on the load screen, but it does work, so must be 4.1 or 4.11.

 

Thanks again for all your help.

 

For anyone else who needs a working version, here's the 4.11 file.

 

 

 

 

Basic XE (Tool Kit).atr

Link to comment
Share on other sites

23 hours ago, TGB1718 said:

10 Call "TEST"

20 Stop
30 Procedure "TEST"
40   ? "HELLO"
50 Exit

 

 

 

Be aware that CALL is bugged in 4.1. The example will work but something like:

 

10 J =1:CALL "Test"

 

will exhibit strange errors, variables will be zeroed or set to random values. CALL only works properly if it is the first (and possibly only) statement in a line. The bug appears to be fixed in 4.2 possibly but the 4.2 extensions are completely broken.

Link to comment
Share on other sites

  • 5 months later...
On 2/10/2022 at 4:29 PM, TGB1718 said:

I've been playing with BASIC XE as it is much faster than Atari Basic and has more functionality,

however I seem to be having problems with Procedures, I've tried simple ones, but

keep getting runtime errors, I do have the expansion loaded, I see the expansion loading screen when I type CAR

D5:\BASIC>CAR
BASIC XE version 4.1 (C)1985 OSS, Inc
Ready

 

Simple procedure test

 

10 Call "TEST"
20 Stop
30 Procedure "TEST"
40   ? "HELLO"
50 Exit

 

I get this error:- 

Error - 10 at line 10
Expression too Complex

 

Any ideas why ?

 

This is just a general info on using procedures in BASIC XE:

 

Procedures/functions work great in XE, however the further down in the program the slower they execute.  On run I don't believe they are address indexed like gosub, and goto line numbers.  They are looked up

like the old basic used to look up line numbers.   So put them at the TOP of program.   I tried to convert a bunch of code to procedures/functions and it got very slow compared to gosub or goto.    If your

looking for speed stick with a traditional gosub, goto or conditional (e.g. on (<condition>) gosub)    

 

FYI:

Your first line should use fast command:  (e.g. 5 FAST)  converts all gosub, goto with line number to address lookups.   

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...