[Coco] Is there a string library for basic09?

K. Pruitt pruittk at roadrunner.com
Mon Feb 2 22:19:46 EST 2015


----- Original Message ----- 
From: "Robert Gault" <robert.gault at att.net>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Monday, February 02, 2015 6:11 PM
Subject: Re: [Coco] Is there a string library for basic09?


> K. Pruitt wrote:
>> I've been thinking that Basic09 has some deficiencies and have narrowed 
>> it down
>> to incomplete string handling commands - in my opinion.  No Mid string 
>> command,
>> no Hex string command, etc. But since I am planning on learning C on the 
>> Coco,
>> and C seems to be THE language in which to implement a string library for
>> Basic09, I figure I'll give it a shot.
>>
>> But I don't want to reinvent the wheel... especially since my wheel is 
>> probably
>> going to be less than perfectly round at first.  So I have to ask if 
>> there is
>> already a string library out there for basic09?  I've looked, but there 
>> is stuff
>> buried in those archives that could be a string library for basic09 and 
>> I'd
>> never know.
>>
>> There are a lot of C string libraries out there on the 'net, so porting 
>> one to
>> the Coco is a real possibility and will probably produce the best 
>> results.
>>
>> Thanks
>>
>>
>>
>>
>>
>
> Well you can mix C and Basic09, but before you go to the trouble you 
> should read the Basic09 references more carefully. :)
>

Excellent suggestion.  :)

Page 233 of Basic09 Tour Guide:  MID$

I am very pleased that it's there and very embarassed that I thought it 
wasn't.


> Here is a list of the Basic09 string functions.
> ASC, CHR$, DATE$, INKEY, LEFT$, LEN, MID$, RIGHT$, STR$, SUB, TRIM$, VAL, 
> STR.
>
> Note that there are indeed string functions such as MID$. Regards the 
> hex$, it is not needed as you can easily use PRINT USING to display 
> numbers in hexadecimal.
>
> Robert
>
>
> -- 

As for print using, that is what I am trying to work around.   I'm trying to 
solve Allen's file size problem of getting that correct value in to a 
variable that can be used in ways other than just by printing out the 
result.




More information about the Coco mailing list