![]() | ||
| Home | SwiftX Archive | SwiftForth Archive | |

Conventionally, FORTH words use dash (-) rather than underscore (_).
Perhaps the best reason is that it is easier to press, one key instead of a
Shift sequence.
I have seen underscore (_) used for constants. This makes reading code
easier as a glace quickly identifies the difference between words that do
something and ones that just return a literal. I like that. Now with the
dawning of SwiftX MCF5484 it appears Forth Inc. is using this convention
too:
SwiftX\Src\ColdFire\Reg_5484.f:
258 0A00 REG: PODR_FBCTL
287 0A20 REG: PPDSDR_FBCTL
If I were to create an EQU for a bit in a register there would be several
choices for the name:
%00000001 EQU UNITA_REGB_BITC
%00000001 EQU UNITA-REGB-BITC
%00000001 EQU UNITA.REGB.BITC
or given that the register name is already chosen, it would be best to keep
that name intact as the prefix...
%00000001 EQU UNITA_REGB_BITC
%00000001 EQU UNITA_REGB-BITC
%00000001 EQU UNITA_REGB.BITC
%00000001 EQU UNITA_REGB:BITC
%00000001 EQU UNITA_REGB[BITC]
etc.
I currently favor UNITA_REGB_BITC because it is simple and can be
represented in any other language too. What do you think about this
"standard"?
----------------------------------------------------------------------
swiftx_at_forth.com The SwiftX programming discussion email list
To unsubscribe, send subject "unsubscribe" to swiftx-request_at_forth.com
For list command help, send subject "help" to swiftx-request_at_forth.com
Message archives are located at http://www.forth.com/archive/swiftx
----------------------------------------------------------------------
This list is a forum for SwiftX users. For product support and bug
reports, please send email to support_at_forth.com
----------------------------------------------------------------------
Received on Thu Aug 18 2005 - 09:36:23 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:50 PST