gerryjackson / forth2012-test-suite

Test programs for Forth 2012 and ANS Forth
72 stars 15 forks source link

A few more proposed tests #13

Closed jkotlinski closed 8 years ago

gerryjackson commented 8 years ago

They Are good ideas, I had it in my to do list to have a test on word names so thanks for that. After I've accepted this pull request I'll change the definition of ~ as it will clash with another test I am adding soon and I'm trying to avoid system re-definition messages cluttering up the screen wherever I can.

jkotlinski commented 8 years ago

The purpose of ~ was to cover the entire visible ASCII range.

Maybe could change to

: _abcdefghijklmnopqrstuvwxyz{|} 3 ; : `abcdefghijklmnopqrstuvwxyz{|~ 4 ; T{ abcdefghijklmnopqrstuvwxyz{|} -> 3 }T T{ _abcdefghijklmnopqrstuvwxyz{|~ -> 4 }T`

?

Then it would also make sure that the last char in a 31-character long word name makes a difference. Although I have to admit, I am not sure that is actually prescribed by the standard.

gerryjackson commented 8 years ago

Yes I realised that about ~ I think a standard system has to allow distinct names with 31 characters. Section 3.3.1.2 states: "Definition names shall contain {1 . . . 31} characters." and there's no point in having that many characters if they don't make a difference.

As you suggest making sure a system takes the last character into account needs to be tested so I'll accept your suggestion.