Punchcard Reader: Difference between revisions
Appearance
Created page with "alt=Punchcard Reader block|thumb|Punchcard Reader block alt=Punchcard Reader GUI|frame|Punchcard Reader GUI Besides the Punchcard Machine, this is the second block needed for using punch cards. It is capable of reading the Punchcard that is currently in the reader-slot (see the image below). It is also capable of shifting items from right-to-left in the 'Input slots' row, then into the 'Reader slot'..." |
No edit summary |
||
| Line 1: | Line 1: | ||
[[File:Punchcard Reader.png|alt=Punchcard Reader block|thumb|Punchcard Reader block]] | [[File:Punchcard Reader.png|alt=Punchcard Reader block|thumb|Punchcard Reader block]] | ||
Besides the [[Punchcard Machine]], this is the second block needed for using punch cards. It is capable of reading the [[Punchcard]] that is currently in the reader-slot (see the image below). It is also capable of shifting items from right-to-left in the 'Input slots' row, then into the 'Reader slot' and then left-to-right into and in the 'Output slots' row. | Besides the [[Punchcard Machine]], this is the second block needed for using punch cards. It is capable of reading the [[Punchcard]] that is currently in the reader-slot (see the image below). It is also capable of shifting items from right-to-left in the 'Input slots' row, then into the 'Reader slot' and then left-to-right into and in the 'Output slots' row. | ||
[[File:Punchcard_Reader_GUI.png|alt=Punchcard Reader GUI]] | |||
== Provided component == | == Provided component == | ||
Revision as of 23:13, 31 July 2026

Besides the Punchcard Machine, this is the second block needed for using punch cards. It is capable of reading the Punchcard that is currently in the reader-slot (see the image below). It is also capable of shifting items from right-to-left in the 'Input slots' row, then into the 'Reader slot' and then left-to-right into and in the 'Output slots' row.
Provided component
This block provides the punchcardReader component, offering the following properties:
| Name | Type | Read/Write | Description |
|---|---|---|---|
hasCardInReader |
boolean |
READ | Returns whether a punchcard is located in the reader slot. |
unreadCardCnt
|
integer
|
READ | Returns how many punchcards are located in the top Input slot row, excluding the reader slot. |
freeOutSlotCnt
|
integer
|
READ | Returns how many slots of the Output slots are empty, excluding the reader slot. |
| Name | Type | Description |
|---|---|---|
:read(shiftCards:boolean) |
String |
If shiftCards is false, returns the contents of the card in the reader slot, or errors if none exists
if |
:shift() |
boolean |
Shifts any existing card in the reader slot down into the output slots and shifts those to the right. Then shifts the input slots to the left, attempting to put a punchcard into the reader slot. Returns whether the inventory was modified. |
