Code/Text Caveat

rocatis
Member Posts: 163
I don't like this:
OBJECT Report 88888 Code/Text Inconsistency { PROPERTIES { ProcessingOnly=Yes; OnPreReport=BEGIN X := 'ABC'; Y := 'ABC'; X := X + 'D'; X += 'E'; Y := Y + 'D'; Y += 'E'; MESSAGE('X=%1, Y=%2',X,Y); END; } CODE { VAR X@1000000000 : Text[30]; Y@1000000001 : Code[10]; BEGIN END. } }Of course we're dealing with different Data Types but Text and Code share a lot of functions where they are interpreted in the same way. Except, apparently, when using += in assignments...
Brian Rocatis
Senior NAV Developer
Elbek & Vejrup
Senior NAV Developer
Elbek & Vejrup
0
Comments
-
+= is not documented and "unsupported" operator (I cannot find the text on net, hard to search for +=). It is there just "by coincidence"...0
-
kine wrote:+= is not documented and "unsupported" operator
-=, *= and /= are also used in standard code (only for numbers, of course).Brian Rocatis
Senior NAV Developer
Elbek & Vejrup0 -
Yes, question is, why the developers at Microsoft are using undocumented unsupported operators... ;-)0
-
Yeah, I stopped using += on text/code a while back after getting unanticipated results. Personally I like the readability of the X := X + Y syntax anyway.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions