(02-03-2024, 05:22 PM)TerryRitchie Wrote: May I ask you @bartok why you are using the CLEAR command?I use CLEAR because I have a program in which there a lot of arrays that become all populated. But I want that the user is be able to restart the program itself without closing and re-executing it. So, there is the first level of DO loops that has this purpouse: if the user press a defined key, the program leaves all the DO loops, except the DO loop of the first level and it returns to the beginning of the program. But in this case, in order to not have errors during the use of the program, I need to have all the variables and arrays CLEARed.
The CLEAR command made sense back in the BASIC-80 days:
CLEAR stringspace, memory, stacksize
Then GWBASIC dropped the need to allocate string space (it was actually BASIC-80 version 5):
CLEAR , memory, stacksizeĀ (this is why this is the only BASIC command that has a parameter list that starts with a comma)
Then QuickBasic dropped the need for memory allocation:
CLEAR , , stacksize
and now QB64(PE) has dropped the parameters all together:
CLEAR , ignored, ignored
The CLEAR statement is included to maintain compatibility with GWBASIC and QuickBasic. The other "features" of CLEAR could/should be handled using QB64PE code instead.
CLEAR command
|
|
« Next Oldest | Next Newest »
|
Messages In This Thread |
CLEAR command - by bartok - 02-02-2024, 10:13 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 02:53 AM
RE: CLEAR command - by bartok - 02-03-2024, 09:52 AM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 04:35 PM
RE: CLEAR command - by bartok - 02-03-2024, 09:11 PM
RE: CLEAR command - by bartok - 02-03-2024, 02:48 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 04:29 PM
RE: CLEAR command - by bartok - 02-03-2024, 06:26 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 05:22 PM
RE: CLEAR command - by bartok - 02-03-2024, 06:16 PM
RE: CLEAR command - by SMcNeill - 02-03-2024, 06:32 PM
RE: CLEAR command - by bartok - 02-03-2024, 08:20 PM
RE: CLEAR command - by SMcNeill - 02-03-2024, 10:24 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 10:55 PM
RE: CLEAR command - by bartok - 02-04-2024, 09:56 AM
RE: CLEAR command - by bplus - 02-03-2024, 06:41 PM
RE: CLEAR command - by TerryRitchie - 02-03-2024, 06:48 PM
RE: CLEAR command - by SMcNeill - 02-04-2024, 12:17 PM
RE: CLEAR command - by bartok - 02-04-2024, 01:13 PM
RE: CLEAR command - by Dimster - 02-04-2024, 03:26 PM
RE: CLEAR command - by bplus - 02-04-2024, 04:16 PM
|
Users browsing this thread: 1 Guest(s)