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

SOURCE #9

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

SOURCE #9

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

Comments

@drom
Copy link
Member

drom commented Nov 26, 2015

The following code:

: GS1 S" SOURCE" 2DUP EVALUATE
       >R SWAP >R = R> R> = ;
T{ GS1 -> <TRUE> <TRUE> }T

Yields the error:

Error: in line: 790 T{ GS1 -> <TRUE> <TRUE> }T  expected [ 0, 0 ] to deeply equal [ -1, -1 ].

The code for SOURCE is clearly wrong: https://github.com/drom/forth/blob/9b1d208fd8c1d15619460a808c7a8b4740da03d2/lib/core.js#L223-L227

// 6.1.2216 SOURCE
    def('source', function () {
        this.dpush(this.here);
        this.dpush(this.io.last - this.io.ptr);
    }, cxt);

Clearly one of the longest ANS94 descriptions:

image


image

@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