• Please review our updated Terms and Rules here

Problem with TI-Basic Program

No need to reshuffle. Just move the DIM statements to the top of the program.
 
I just realised myself the TI uses SEG$ and not MID$, so have corrected those lines.

I've moved the 2 lines with the dim commands to the top of the program.

The program now starts, but it's not linking to the data commands at the mo, do I need to stick all those to the top aswell, 1620 onwards? That would mean a lot of renumbering! Just use a goto instead?

At the moment I get the messages "Your Location" then nothing, followed by "Exits" etc....

It then let's me type in a command but I get a string number mismatch error on line 390 when I do:

390 IF VB>V AND OB>0 THEN M$="YOU CAN'T '"+Q$+"'":pAUSE 1.5

The CC-40 manual btw is available at:

ftp://ftp.whtech.com/hexbus_cc40_ti74/CC40 user guide/

You will to load a paper port reader to view the files though in .max format...
 
The program now starts, but it's not linking to the data commands at the mo, do I need to stick all those to the top aswell,

No, you should be able to have DATA statements anywhere in the program.
(Of course, having seen what this weird BASIC dialect requires of DIM statements,
I'm not making any promises).
 
TI Extended Basic does not use + to concatenate strings. You should replace those with & signs:

390 IF VB>V AND OB>0 THEN M$="YOU CAN'T '"&Q$&"'":pAUSE 1.5

I'm not sure if PAUSE exists neither, but you'll find out if it does and for how long it will pause.

Edit: Ok, browsing through the reference manual you really have PAUSE using that syntax, so no worries. It also says DATA can be anywhere in the program, but you may not have other commands on the same line as a DATA statement. I suppose you need to be experienced in other Basics to know what to look for could be different in the dialect you're currently working with. For an untrained eye two slightly different statements may look very much alike.
 
Last edited:
I put the pauses in myself, cos the display of a CC-40 is only a single line, without a pause the message is not visible by the naked eye! The longer the text, the more time I give in order to read it.

As for using + signs I'm sure I've used them in CC-40 basic before...but I will give & a try it out when I get home....

Also I'm gonna have to rewrite the READ lines as I think the cc-40 only responds to numbers in brackets and not letters...

Not really sure what I'm doing...but it's all good fun!
 
Did we ever find out what book this is in?

I might be interested in trying this on MBASIC.
 
I have the book at home. Maybe I'd give you the title if you help to get this to work on mine first! The program I listed is the entire program though
 
The book is called "Write your own Adventure Programs for your Microcomputer" ISBN - 0-86020-741-2
 
Problem with TI-Basic Program

CC40 BASIC is a subset of TI Extended BASIC.

N=3:DIM A$(N)! is not valid.

N must be explicit, ie 7, 32, or whatever. Also, the 1st element is 0,
not 1 - A frequent source of confusion.

As previously noted, SEG$, not MID$. Another foo factor is that if
you allow 0 as the 2nd parameter in a SEG$ you'll get an error.

I was digging through some old files this weekend and found a DOS
executable I wrote about 20 years ago that will take a ASM7 .LST
file and turn it into a *.B74 file, as in

100 CALL POKE(ADR,BYTE0,BYTE1,BYTE2, ...)
110 CALL POKE(ADR+10, ...)

And so on. Useful for CC40/TI74 asm routines.

If anyone can use it let me know.

Jack
 
Problem with TI BASIC program

Problem with TI BASIC program

Oops. Should be...

N=DIM A$(N)! is not valid.
 
Back
Top