[Firebird-docs] [Firebird-checkins] manual/src/docs/refdocs/langref/fblangref25 fblangref25-commons.xml, 1.6, 1.7 fblangref25.xml, 1.19, 1.20

2016-03-28 Thread Helen Borrie
Update of /cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7265

Modified Files:
fblangref25-commons.xml fblangref25.xml 
Log Message:
Added a correction to arithmetic operator predence.

Index: fblangref25-commons.xml
===
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25-commons.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- fblangref25-commons.xml 27 Mar 2016 21:20:47 -  1.6
+++ fblangref25-commons.xml 28 Mar 2016 19:03:03 -  1.7
@@ -403,17 +403,17 @@
 
   /
   Division
-  2
+  1
 
 
   +
   Addition
-  3
+  2
 
 
   -
   Subtraction
-  4
+  2
 
   
 
@@ -425,6 +425,10 @@
  SET A = 4 + 1/(B-C)*D
 
   
+  
+Where operators have the same precedence, they are evaluated 
in 
+left-to-right sequence.
+
 
 
 

Index: fblangref25.xml
===
RCS file: 
/cvsroot/firebird/manual/src/docs/refdocs/langref/fblangref25/fblangref25.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- fblangref25.xml 27 Mar 2016 21:20:48 -  1.19
+++ fblangref25.xml 28 Mar 2016 19:03:03 -  1.20
@@ -5,7 +5,7 @@
   
 Firebird 2.5 Language Reference
 Beta Release 1
-26 March 2016, document version 0.902
+29 March 2016, document version 0.903
 
   
 Dmitry


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Firebird-checkins mailing list
firebird-check...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-checkins


--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs


[Firebird-docs] FbLangRef Build 0.902

2016-03-28 Thread Köditz , Martin
Hi Helen,

it will take some time, but I'm able to implement the diffs.

Martin
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs


[Firebird-docs] Talking' about precedence...

2016-03-28 Thread Paul Vinkenoog
Hi all (especially Helen),

I got suspicious when I saw the precedence of arithmetic operators listed like 
this:

1: *
2: /
3: +
4: -

So I tested it:

SQL> select 1 - 3 + 3 from rdb$database;

  ADD
=
1

-- so + doesn't have higher precedence than - (otherwise result would be -5)

SQL> select 2.0 / 8.0 * 10.0 from rdb$database;

 MULTIPLY
=
2.500

-- so * doesn't have higher precedence than / (otherwise result would be 0.025)


SQL> select 4 + 5 * 10 from rdb$database;

  ADD
=
   54

-- as expected, * has higher precedence than + (otherwise result would be 90)

SQL> select 5.0 + 5.0 / 5.0 from rdb$database;

  ADD
=
 6.00

-- as expected, / has higher precedence than + (otherwise result would be 2.00)

So the correct order is:

1: *, /
2: +, -

Operators of the same precedence are evaluated LTR.


Cheers,
Paul

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs


Re: [Firebird-docs] LangRef 2.5beta1 - a few suggestions /2

2016-03-28 Thread Paul Vinkenoog
Aage Johansen wrote:

> First, thanks to Paul for checking my suggestions.
> Actually, I may have misremembered: I thought there might be pitfalls
> regarding the sign of the result.

There are. Or rather, there is one: 0x8000 - 0x map to negative 
INTEGER values, whereas 0x08000 - 0x0 map to positive BIGINTs.

But I see Helen has taken care of that in her latest commit.

> As for BETWEEN and the others: maybe precedence is totally irrelevant
> for "comparison predicates".  I just mentioned it since "comparison
> operators" have defined precedence.

According to IBPhoenix's Using Firebird and Helen's Firebird Book, 
BETWEEN...AND, LIKE, CONTAINING and STARTING [WITH] all have precedence 9 
(lowest) among the comparison operators. I assume that the same is true for 
SIMILAR TO.

> I've spent most of Easter in hospital, and haven't really been keen on 
> doing testing. Sorry about that.

Hope you're doing alright now!


Cheers,
Paul Vinkenoog

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471=/4140
___
Firebird-docs mailing list
Firebird-docs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-docs