RosettaCodeData/Task/Increment-a-numerical-string/Inform-7/increment-a-numerical-strin...

16 lines
422 B
INI

Home is a room.
To decide which indexed text is incremented (T - indexed text):
let temp be indexed text;
let temp be the player's command;
change the text of the player's command to T;
let N be a number;
if the player's command matches "[number]":
let N be the number understood;
change the text of the player's command to temp;
decide on "[N + 1]".
When play begins:
say incremented "12345";
end the story.