I suppose most of you will know this,
but as i see in many examples and code many people work with
x := x + 1;
dito for - , * and /
x := x - 1;
x := x * 1;
x := x / 1;
This is much simpler and shorter:
x += 1;
x -= 1;
x *= 1;
x /= 1;
There are no bugs, only random undocumented features...
---
My Blog:
http://NAV-Magno.be
Comments
And main thing> it was not supported and never guaranteed that this :feature: will be in next versions too (it is something what is working but is not documented and without warranty)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Because they're Microsoft.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
RIS Plus, LLC
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
Time's changing and what I wrote is about something few years old. Now is another time.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
RIS Plus, LLC
It just didn't work, so I had to use x:=x+1 instead of x+=1
Unfortunately, i don't have examples, but i would not recommend to use such expressions.
RIS Plus, LLC
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Definitely thereare some cases where it does not work, but they are rare. For example in 2.00 there was an issue with
MyDate += 1; to increment date even though it worked fine in 1.3 and then again in 2.01 (It may not be exactly that, butsomehting similar, itwas along time ago).
I have never seen a problem with integer, text or Decimal though.
RIS Plus, LLC
RIS Plus, LLC
I guess I took that as a question. THough looking closely I see there is no "?" mark at the end, so technically it wasn't really a quesiton :roll:
Sorry, moving from town to town stopping at internet cafes checking for news from police and consulates, is probably not the ideal time to be replying on forums, but it gives me some time to relax I suppose.
I don't see why not, the operator should only be a direct mapping to the CALCDATE function in any case.
No different to what overloaded operators in C++ would do in such a case of a date class which would provide a CALCDATE function and map the mathematical operators directly onto it. If one method works, so should the other.
RIS Plus, LLC
RIS Plus, LLC