zeroflag / punyforth

Forth inspired programming language for the ESP8266

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

char:

GerardSontag opened this issue · comments

char: is not an immediate word and this prevent writing it, easily, in a column word on the opposite hex: can be used in interactive and compiling mode.
Is it possible to have char: written in the same manner as hex: like this
: char: immediate word drop c@ interpret? invert if ['], , then ;
Yes i can overwrite it, but do you think it has to be include in the core?

Yes I think it makes sense to work like this. Currently this is the typical usage of char: from inside a column def.

[ char: F ] literal

The [ temporary switches to interpretation mode, then char: parses the given character and finally literal compiles it. This is quite clumsy.

Using the way you suggested would make the usage easier. Let me check first if it causes any problem or incompatibility.

I made it state aware as you suggested. This won't work if someone intentionally wants to force the interpretation semantics in compile mode, but I don't think this is a common usage (like ' and [']) of char:.

Hello,
Thank you!

This won't work if someone intentionally wants to force the interpretation semantics in compile mode <
This is nearly the same as hex: