How to append an ASCII to a string?

RachelSoon
Member Posts: 202
Hi All,
How can i append an ASCII key to a string?
For Example :
I have a string which concantenate the ID and Name.
i would like to append a tab in between the ID and Name. How can i do that?
How can i append an ASCII key to a string?
For Example :
I have a string which concantenate the ID and Name.
i would like to append a tab in between the ID and Name. How can i do that?
0
Comments
-
So you have a string like following:
007James Bond
And you want to have it like this :
007->James Bond (-> = tab)
Is this correct? And why want this?"Real programmers don't comment their code.
If it was hard to write, it should be hard to understand."0 -
Yes, eromein. Your example is what i am looking for.
The reason i want the string to be this manner is i am going to send out this string as an email text. It's easier to read if i have a tab to separate the information.
would like my email text something like this :
007 James Bond
008 Jennifer Lopez
009 Santa Clause0 -
Hi,
try this little code:ID := '007'; Name := 'James Bond'; TabChar := 9; MESSAGE('%1',ID+FORMAT(TabChar)+Name);
with following definitions:Name DataType Subtype Length ID Code 10 Name Text 30 TabChar Char
br
Josef Metzbr
Josef Metz0 -
define a variable of data type Char:
Name DataType Subtype Length ch9 Char
then just assign an ascii value for this char:ch9:=9; //9 is ascii for tab
when combining strings use STRSUBSTNO:MyText := STRSUBSTNO('007%1James Bond',ch9);
or concatenation of strings:MyText := '007' + Format(ch9) + 'James Bond';
®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
It's getting dangerous to post answers. Some posts may just colide...®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
hi guys,
Thank you very muchy.
I got it now!.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