#18 LSET (RSET?) doesn't fill the field

Closed
opened 2 years ago by ChipMaster · 2 comments

If I write a long string into a FIELD var and then write a short string the longer part of the previous string remains.

bwBASIC: AUTO
10 OPEN "R", #1, "JUNK.DAT", 64
20 FIELD#1, 64 AS C_NAME$
30 LSET C_NAME$ = "JON WAS HERE AND THEN HE LEFT"
40 ?C_NAME$
50 LSET C_NAME$ = "JOE"
60 ?C_NAME$
^C
bwBASIC: RUN
JON WAS HERE AND THEN HE LEFT                                   
JOE WAS HERE AND THEN HE LEFT                                   

The purpose of LSET and RSET are to left or right justify content into a FIELD variable, padding the remaining space with " “.

It hasn’t been tested but RSET is likely broken too. :-(

If I write a long string into a `FIELD` var and then write a short string the longer part of the previous string remains. ``` bwBASIC: AUTO 10 OPEN "R", #1, "JUNK.DAT", 64 20 FIELD#1, 64 AS C_NAME$ 30 LSET C_NAME$ = "JON WAS HERE AND THEN HE LEFT" 40 ?C_NAME$ 50 LSET C_NAME$ = "JOE" 60 ?C_NAME$ ^C bwBASIC: RUN JON WAS HERE AND THEN HE LEFT JOE WAS HERE AND THEN HE LEFT ``` The purpose of `LSET` and `RSET` are to left or right justify content into a `FIELD` variable, padding the remaining space with " ". It hasn't been tested but `RSET` is likely broken too. :-(
ChipMaster added the
blunder
label 2 years ago
ChipMaster self-assigned this 2 years ago
ChipMaster changed title from Apparently LSET is broke to LSET doesn't fill the field 2 years ago
ChipMaster commented 2 years ago
Owner

Confirmed the above code in BASICA returns:

Ok
RUN
JON WAS HERE AND THEN HE LEFT                                   
JOE
Ok
Confirmed the above code in BASICA returns: ``` Ok RUN JON WAS HERE AND THEN HE LEFT JOE Ok ```
ChipMaster changed title from LSET doesn't fill the field to LSET (RSET?) doesn't fill the field 2 years ago
ChipMaster commented 2 years ago
Owner

This is fixed in commit 1db6c116

This is fixed in commit 1db6c116
ChipMaster closed this issue 2 years ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.