Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

>IN #10

Open
drom opened this issue Nov 26, 2015 · 0 comments
Open

>IN #10

drom opened this issue Nov 26, 2015 · 0 comments
Labels
Milestone

Comments

@drom
Copy link
Member

drom commented Nov 26, 2015

The following code:

VARIABLE SCANS
: RESCAN?  -1 SCANS +! SCANS @ IF 0 >IN ! THEN ;

T{ 2 SCANS !
345 RESCAN?
-> 345 345 }T

: GS2  5 SCANS ! S" 123 RESCAN?" EVALUATE ;
T{ GS2 -> 123 123 123 123 123 }T

: GS3 WORD COUNT SWAP C@ ;
T{ BL GS3 HELLO -> 5 CHAR H }T
T{ CHAR " GS3 GOODBYE" -> 7 CHAR G }T
T{ BL GS3
DROP -> 0 }T                \ BLANK LINE RETURN ZERO-LENGTH STRING

: GS4 SOURCE >IN ! DROP ;
T{ GS4 123 456
-> }T

Yields the errors:

Error: in line: 797 -> 345 345 }T  expected [ 837 ] to deeply equal [ 837, 837 ].
Error: in line: 800 T{ GS2 -> 123 123 123 123 123 }T  expected [ 291 ] to deeply equal [ 291, 291, 291, 291, 291 ].
Error: in line: 803 T{ BL GS3 HELLO -> 5 CHAR H }T  expected [ 72, 69 ] to deeply equal [ 5, 72 ].
Error: in line: 804 T{ CHAR " GS3 GOODBYE" -> 7 CHAR G }T  expected [ 71, 79 ] to deeply equal [ 7, 71 ].
Error: in line: 805 T{ BL GS3 DROP -> 0 }T       expected [ 68, 82 ] to deeply equal [ 0 ].
Error: in line: 810 -> }T  expected [ 291, 1110 ] to deeply equal [].
@drom drom added the bug label Nov 26, 2015
@drom drom added this to the v1 milestone Nov 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant