Skip to content
This repository has been archived by the owner on Nov 25, 2019. It is now read-only.

Upgrade ? command #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ConorOBrien-Foxx
Copy link

Summary: ? now can take any character as input, as well as detect EOF.

Motivation:

  1. To have a somewhat sane cat program: ?"!?'".
  2. To make the input command less frustrating to use in general.

Previous behaviour

? would repeat the last character in the stream if it ran out of characters to consume. Furthermore, it would skip certain characters (such as linefeeds) when processing input. Whether or not this was by design is unclear.

Implemented behaviour

? takes 1 raw character of input using the method getchar() inherited from C. When encountering EOF, ? will set the current cell to 0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant