PickBASIC / FlashBASIC

clearselect statement

.md

The clearselect statement clears the active select-list specified by the list.var and releases all overflow associated with that list. Any external select-list is also cleared if the list variable is not specified.

Syntax

 clearselect {list.var}

Example(s)

Example 1

5 *
readnext key else
   print ’Frist Week ’,hours
   stop
end
read member from file,key else goto 5
hours += member<4>
print member<1>,member<4>
if hours > 40 then
   clearselect
   goto 5
end

Example 2

This example shows how to un-assign a variable to clear memory so that the memory can be used for something else:

Type:

 a = 5
 print a 
 clearselect a
 print a

Output after compiling:

 5
 [B10] in program “p21”, Line 4:
 Variable has not been assigned a value; zero used.
 0

The variable is now available for you to use.

See also

Referenced by