It is currently Tue Oct 16, 2018 10:24 am


All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Unit 2 - Lesson 4: Expressions – ASCII Character Set
PostPosted: Tue May 31, 2011 5:48 pm 
User avatar

Joined: Wed Nov 17, 2010 8:37 am
Posts: 136
Real Name: Terry L. Wiechmann
Began Programming in MUMPS: 0- 0-1971
By default, the MUMPS language is defined using the ASCII character set. Data is confined to the set as well. Some MUMPS systems let you choose UTF-8 which is a larger character set. This is important if you are going to use the system in conjunction with Web work. We are only interested in the 128 characters (decimal 0-127) that make up the ASCII set during this course.

It is important to remember that MUMPS uses the decimal numbering system when working with the characters sets. There are two MUMPS functions that work with the character sets:
  • $ASCII(string,position) – Converts the character in the string at position to a decimal number.
  • $CHAR(number[,number...] - Changes each number in the list to a character.

We will use these functions in the next lesson on Strings. The important thing to remember is that these functions let you convert back and forth between the graphical character and its internal decimal number representation.

Another feature of the character set is that it can be divided into groups. The pattern matching operator in the last lesson of this unit uses this feature to identify patterns in a string. These groupings are:

Group (Number Ranges)
Control (0-31, 127)
Punctuation (32-47, 58-64, 91-96, 123-126)
Numeric (48-57)
Alphabetic (65-90, 97-122)
Uppercase (65-90)
Lowercase (97-122)
Everything (0-127 including the null string)

_________________
Terry L. Wiechmann


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net