02-26-2021, 09:38 AM | #1 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Request for comments: new template language operations
I am adding "standard" binary and unary logical and arithmetic operators to the template language. The question: "what is the precedence of the operators?"
In line with other languages, my own preferences, and the characteristics of the existing language; the current choice from highest to lowest (binding first to last) is:
|
02-26-2021, 10:38 AM | #2 |
Wizard
Posts: 1,090
Karma: 1948136
Join Date: Aug 2015
Device: Kindle
|
Those change are most welcome. I leave the discussion about the order of precedence for people who know more about the subject than I do. It is fine with me so long as I can explicitly set the order using parenthesis.
|
Advert | |
|
02-27-2021, 12:17 AM | #3 |
Grand Sorcerer
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Yes please! Those will be great additions.
The precedence looks good to me. It matches most languages I have used and I can't see anything missing. |
02-27-2021, 12:09 PM | #4 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The changes are in calibre master source. It would be very useful if people who run from source try it and let me know about problems, and in particular any backwards compatibility issues.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Template language changes | chaley | Library Management | 132 | 03-03-2024 06:34 PM |
A few questions... (template language, mainly) | Clem2605 | Library Management | 2 | 12-30-2020 03:25 AM |
Template Language | phossler | Calibre | 8 | 01-12-2016 04:37 PM |
Help with template language | Pepin33 | Calibre | 8 | 11-11-2012 08:32 AM |
Template language question | BookJunkieLI | Library Management | 7 | 02-02-2012 06:55 PM |