Skip to content

A clause concerning unused #43

@ruv

Description

@ruv

\ UNUSED tests revised as UNUSED UNUSED = may return FALSE when an
\ implementation has the data stack sharing unused dataspace.

(added in the commit 2d0224a)

I don't think unused unused = may return false in a standard Forth system.

If placing a value on the data stack may affect unused, then that is a side effect that must be specified in the standard if it is allowed.

This is because:

  • for a standard-compliant program: everything which is not explicitly forbidden by the standard is allowed;
  • for a standard-compliant system: everything which can be detected by a standard-compliant program and is not explicitly allowed by the standard is forbidden;

Thus, a standard Forth system shall pass the following test case:

t{ here unused  2dup erase  here unused  d=  -> true }t

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions