Querier Forum

  | Discussion |

Bottom | Unframe

Re: Set decimals

From: mda
Keywords: Querier, Suggestion
Remote Name:
Remote User:
Date: 06/19/01
Time: 14:26


I think the simplest, cleanest solution would be for you to use something like the following:

initexp = "docmd([publ qxprevdec], [qxprevdec = set('deci')], [set deci to 0])"
cleanupexp = "docmd([set deci to m.qxprevdec])"

I.e. my suggestion is that you should, in fact, make use of PUBLIC in this situation.  Since your application is not generic, and there are no recursion/reentrancy issues, prejudice against using PUBLIC variables seems unwarranted.  Practically speaking, there is no danger in making appropriate use of PUBLIC variables here, especially if you are reasonably careful about naming conventions and documentation.

You could instead use a reserved PRIVATE memory variable that is initialized in the wrapper or elsewhere up the stack, but that doesn't strike me as being either cleaner or simpler.  I suppose the cleanest approach would be to introduce a new Querier metafile field for the SET DECIMALS expression to associate with the query definition, but this would require some Querier programming changes.  (Let me know if you think such an extension is worthwhile.)  Also note that one would generally want to use SET FIXED ON in conjunction with SET DECIMALS.


| Top | Unframe | Help |

 | Contents | Discussion |

Brought to you by SpaceTime Systems.  All rights reserved.