Mantis Bug Tracker

View Revisions: Issue #753 All Revisions ] Back to Issue ]
Summary 0000753: I6 substitution returning a value can be used for any kind
Revision 2011-09-21 17:07 by EmacsUser
Minimal Source Text To Reproduce There is a room.
To decide what value is bar: (- 0 -).
To foo (X - a device):
foo bar.
Revision 2011-09-21 17:07 by EmacsUser
Minimal Source Text To Reproduce "a relation of (a relation of an arithmetic value to K) to..." by Ron Newcomb.

An understood word is a kind of value. Some understood words are misunderstood. To say (dict - an understood word): (- print (address) {dict}; -).

A 1-based index is a kind of value. Some 1-based indexes are the numberline-starting-from-1.

To decide which relation of 1-based index to a relation of [arithmetic] value to word value is the parsed player's command: (-parse-).

To decide what K is the (field - a relation of a number to a value of kind K) # (index - a number) of (arr - a relation of 1-based index to a relation of a number to [K] word value): (- ({-pointer-to:arr}-->(({index}{-pointer-to:field} -).


Every turn:
say "The 2nd word used was [word # 2 of the parsed player's command].";
say "The position is at [position # 2 of the parsed player's command].";
say "The length is [length # 2 of the parsed player's command].";



Section - (for Glulx only)

Glulx is a room.
To decide what relation of number to number is the length: (- *3-1))) -).
To decide what relation of number to number is the position: (- *3)) - 3) -).
To decide what relation of number to understood word is the word: (- *3-2))) -).


Section - (for Z-machine only)

The Z-machine is a room.
To decide what relation of byte to number is the length: (- *4))) -).
To decide what relation of byte to number is the position: (- *4)+1) - 1) -).
To decide what relation of number to understood word is the word: (- *2)-1)) -).

A byte is a kind of value. $$11111111 specifies a byte.

To decide what K is the (field - a relation of a BYTE to a value of kind K) # (index - a number) of (arr - a relation of 1-based index to a relation of a BYTE to [K] a word value): (- ({-pointer-to:arr}->(({index}{-pointer-to:field} -).




Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker