Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

iteration.mon : wrong hash key/value #90

@wade-fs

Description

@wade-fs

When I execute iteration.mon, I got wrong :

Hash: key
Foo
Steve
Hash: key/value
Bar => Foo
Bar => Foo

When I rewrite script to:
_h = { "Foo": "Bar", "Steve": "Kemp", "Name": "Wade" }
puts( "Hash: key\n")
foreach key in h {
puts( "\t", key, "\n");
}

hh = { "Foo": "Bar", "Steve": "Kemp", "Name": "Wade" }
puts( "Hash: key/value\n")
foreach key,val in hh {
puts( "\t", key, "\t=>\t", val, "\n");
}_

I got:
Hash: key
Steve
Foo
Steve
Hash: key/value
Bar => Foo
Kemp => Steve
Wade => Name

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