https://github.com/jrincayc/ucblogo-code
Revision 68a93248641e91314d2700e8a3c6ba0c73ba5422 authored by Joshua J. Cogliati on 27 December 2021, 16:56:40 UTC, committed by Joshua J. Cogliati on 27 December 2021, 16:56:40 UTC
1 parent e3a5d7a
Raw File
Tip revision: 68a93248641e91314d2700e8a3c6ba0c73ba5422 authored by Joshua J. Cogliati on 27 December 2021, 16:56:40 UTC
Updating version to 6.2.2pre1
Tip revision: 68a9324
case
CASE value clauses					(library procedure)

	command or operation.  The second input is a list of lists (clauses);
	each clause is a list whose first element is either a list of values
	or the word ELSE and whose butfirst is a Logo expression or
	instruction.  CASE examines the clauses in order.  If a clause begins
	with the word ELSE (upper or lower case), then the butfirst of that
	clause is evaluated and CASE outputs its value, if any.  If the first
	input to CASE is a member of the first element of a clause, then the
	butfirst of that clause is evaluated and CASE outputs its value, if
	any.  If neither of these conditions is met, then CASE goes on to the
	next clause.  If no clause is satisfied, CASE does nothing.  Example:

		to vowelp :letter
		output case :letter [ [[a e i o u] "true] [else "false] ]
		end

back to top