RE: [RBASE-L] - Where do I set my Vars?

2023-11-08 Thread javier.valencia
If I understand correctly, by Universal Key you mean a Primary Key with Foreign keys linked. I personally would not use a real or double type as Primary key, precisely because of the problems you are encountering. You can have the same value generated at different time and depending on how is co

Re: [RBASE-L] - Where do I set my Vars?

2023-11-08 Thread Lin MacDonald
That's really helpful. Thank you! On Wed, Nov 8, 2023, at 12:56 PM, Bruce Chitiea wrote: > I try to have all calculation and data-formation issues squared away before > applying display formatting. So, from R:SYNTAX, this might be helpful: > *(BRND(***arg1,arg2,arg3***))* > > Rounds REAL, DOUBL

Re: [RBASE-L] - Limit command does not work as documented

2023-11-08 Thread Charles Stevens
The documentation I have shows LIMIT without an "=" sign with two parameters, i.e.: LIMIT X, Y where X is the first row (starting at 0) and Y is the number of rows to retrieve. It does work as per the documentation. The alternative, with an "=" sign, returns the specified number of rows always star

Re: [RBASE-L] - Where do I set my Vars?

2023-11-08 Thread Lin MacDonald
Sadly, that's about when I wrote this! It is a Universal Key attached to several other tables so I can't really change it to a double, I guess Lin On Wed, Nov 8, 2023, at 12:43 PM, 'Karen Tellef' via RBASE-L wrote: > > > Welcome to the not-so-wonderful world of the "REAL" datatype. Long ago

Re[2]: [RBASE-L] - Where do I set my Vars?

2023-11-08 Thread Bruce Chitiea
I try to have all calculation and data-formation issues squared away before applying display formatting. So, from R:SYNTAX, this might be helpful: (BRND(arg1,arg2,arg3)) Rounds REAL, DOUBLE, or CURRENCY data to a specific number of decimal places and allows specification of the number of signi

Re: [RBASE-L] - Where do I set my Vars?

2023-11-08 Thread 'Karen Tellef' via RBASE-L
Welcome to the not-so-wonderful world of the "REAL" datatype.  Long ago in DOS days that was the only datatype (other than currency) that allowed decimals.  Unfortunately it isn't real accurate IMO (pun intended).  Most of us switched all those Real numbers to the DOUBLE datatype.  With Double

Re: Re[2]: [RBASE-L] - SET ZERO

2023-11-08 Thread Tony Luck
It is an interesting thing the set zero on or off logic, many overlook it when a certain statement doesn't seem to be calculated correctly (or so they think). Anyway I am still around, just really busy with the prawn farm being sold to an overseas company. Being in the top end of Australia it's war

Re[2]: [RBASE-L] - SET ZERO

2023-11-08 Thread Bruce Chitiea
Hey Tony, thanks. Good philosophy. I had thought of SET ZERO OFF as a LOCAL toggle, not as a database default (RTFM, my bad. ) I'm gonna go conservative at the local level with this approach: IF varname IS NOT NULL OR varname > 0 THEN --do the [ > 0 ] thing ELSE --do the [ NULL | < 0 | = 0 ]

Re: [RBASE-L] - Where do I set my Vars?

2023-11-08 Thread lin...@gmail.com
Hello Razzak, Thank you - that is what I was looking for. I knew there was a simple solution. I am getting a strange output though: the real number stored is 104.31 000.## prints as 104.30 000.### prints as 104.309 This is an unusual situation where the number stored could possibly be

Re: [RBASE-L] - SET ZERO

2023-11-08 Thread Tony Luck
Morning Bruce, Interesting question over the morning cuppa. In general I consider that the "IF varname > 0" is a comparison statement and setting zero on or off doesn't affect the outcome, in saying that however should there be a calculation i.e. set var vresult = (.v1 + .v2 + .v3) prior to the co

[RBASE-L] - SET ZERO

2023-11-08 Thread Bruce Chitiea
All: Does SET ZERO affect the parsing of this code: IF varName > 0 THEN ... where varName is INTEGER? In other words, is that expression considered to be a mathematical expression by the parser? From R:SYNTAX: "SET ZERO allows a null to be treated as a zero in a mathematical expression involvi