From: Rick M. <obj...@gm...> - 2009-02-27 13:43:12
|
I'm starting to come around to the position that the default digits setting should be 9 (not completely convinced yet, but close). However, I think that if this is done, then there are some additional things that need to be added. One is a ::options directive to allow these things to be tailored on a source file basis. So here's a straw-man proposal for a directive: ::OPTIONS DIGITS digits FORM form FUZZ fuzz TRACE trace STRICTNOVALUE All options are optional, and can be specified in any order or multiple times. Last one wins if there are multiples. The OPTIONS directive may appear anywhere after the main program section of the source file, and can be specified multiple times as well (last one wins applies here too, if an option appears on multiple directives). All options apply to all Rexx code contained within the source file. So for, example, including ::options digits 18 would mean that an initial digits setting of 18 will be used for all Rexx code created this source file. This includes the main program, all routines declared using ::ROUTINE, and all methods. All option values must be either a symbol taken as a constant or a literal string. No expression evaluation takes place with directives, which are static source descriptors. The options are fairly self-explanatory, but I think there is a need for some keyword for DIGITS that means "use the same as the internal built-in setting". Looking for a name suggestion on that one. The STRICTNOVALUE is for people routinely enable NOVALUE traps in all code. This will raise a SYNTAX error in any situation where a NOVALUE condition would be raised. I'm waffling on the keyword here too...perhaps this should be NOVALUE keyword with an option such as CONDITION/SYNTAX or RELAXED/STRICT. In the theory that you want to be able to explictly specify all forms of an option, probably the last would be better. Given that I'm going to the trouble of implementing this, I'd like to make it apply to more than just the digits setting, hence the additional options. Rick |