[Coco] Programming in BASIC YouTube series URBANE Version
Arthur Flexser
flexser at fiu.edu
Fri Apr 29 20:09:22 EDT 2016
I notice two changes from standard Basic in this: no line numbers in most
lines, and where line numbers are used, they appear between underscores.
This is typed in (to a word processor?) by the user and saved as a data
file and then Urbane reads that data file and converts it, outputting the
conversion results to an Ascii file that standard Basic can load in?
This example seems not to contain any long variable names. How are such
long names converted to standard Basic variable names? That is, what
method do you use to avoid the problem simple truncation would have in
cases where several long names start with the same beginning characters?
Allowing lowercase in variable names would be nice, if that is not already
a feature.
Art
On Fri, Apr 29, 2016 at 3:03 PM, Stephen H. Fischer <
SFischer1 at mindspring.com> wrote:
> Agreed, but I cannot download files.
>
> Someone else would need to do it.
>
> But then the resulting post could not be sent to the mailing list as it
> would be too large.
>
> That's why zip files were invented.
>
> The dim witted (SOME only) that refuse to use facebook and
> tandycoco.com/coco-forum are locking themselves out of much that is good.
>
> I will see if a post of the converted Selection Sort does not break the
> mailing list limit.
>
> SHF
>
> ---------------------------------------------
> '********************
> '* *
> '* SELECTION SORT *
> '* *
> '********************
> '
>
> _1100_ ' GENERATE RANDOM DATA
> ' PMODE 4
> ' SCREEN 1,0
> ' DIM NO( 126 )
> ' PCLS 0
>
> FOR I = 1 TO N
> NO( I ) = INT( RND( 190 ) )
> HLINE ( I * D, 190 ) - ( I * D, 190 -NO( I )), PSET
> NEXT
> HCOLOR 3,2: FOR I = 0 TO 80 STEP 16 : HPRINT(I,0)," SELECTION
> SORT.": NEXT I : HCOLOR 1,2
> FOR J = N TO 1 STEP -1
> LS = -1: SI = -1
> FOR I=1 TO J:IF NO( I ) > LS THEN LS = NO( I ): SI =I: NEXT I ELSE
> NEXT I
> GOSUB _1290_
> TM = NO( J ) : NO( J ) = NO( SI ): NO( SI ) = TM
> GOSUB _1320_
> NEXT J
> RETURN
>
> ' LINE DISPLAY SUBROUTINES
>
> _1290_ HLINE ( J * D, 190 ) - ( J * D, 0 ),PRESET
> HLINE ( ( SI ) * D, 190 ) - ( ( SI ) * D, 0 ), PRESET
> RETURN
> _1320_ HLINE ( J * D, 190 ) - ( J * D, 190 - NO( J ) ), PSET
> HLINE ( ( SI ) * D, 190 ) - ( ( SI ) * D, 190 - NO( SI ) ), PSET
> RETURN
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list