Type Conversion

brianbernard191
Member Posts: 19
Type conversion is not possible because one of the operators contains an invalid type.
I have been trying to simply add two variables of type integer and display the result in a pop up window using MESSAGE function.
This is the code segment. The type of variables op1 and op2 is defined as INTEGER.
I have been trying to simply add two variables of type integer and display the result in a pop up window using MESSAGE function.
op1 := 10; op2 := 20; op1 := op1 + op2; MESSAGE(op1);
This is the code segment. The type of variables op1 and op2 is defined as INTEGER.
0
Comments
-
Try...
MESSAGE('%1',op1);
...messages always have to be text, so you need to convert the Integer (op1) to text. You could also have used....MESSAGE(FORMAT(op1));
1 -
@Kishorm Thank you !! It worked.0
-
No problem!
P.S. You should mark the post as "Solved" so a tick appears against the post and others can see that it's already been resolved0 -
@Kishorm : How can I mark a post as solved? I couldn't find any option for that. I am completely new with mibuso.0
-
Try...
1. Go back to the Origin of the thread.
2. Click on "Edit" button.
3. Attribute field will appear with drop-down default value "None".
4. Select "Solved" form the drop-down and Submit.0 -
@Kishorm: I couldn't find an attribute drop down in the edit page.0
-
I hope that EDIT suggestion was for old site.
for new site...didn't you find "Did this answer the question YES or NO" option under the replies?0 -
Oops, I just searched for the answer to this as I haven't posted a question in years so haven't had the chance to do it myself and didn't realise this related to the old site. Hopefully, Mohana's reply on this will prove to be a little more useful0
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