Understanding the Interactive Matrix Language |
You input a character matrix literal by entering character strings. If you do not use quotes, all characters are converted to uppercase. You must use either single or double quotes to preserve case or when blanks or special characters are present in the string. For character matrix literals, the length of the elements is determined from the longest element. Shorter strings are padded on the right with blanks. For example, the following assignment of the literal results in being defined as a character matrix with string length 4 (the length of the longer string):
a={abc defg};Here is the resulting matrix:
A ABC DEFGThe following assignment preserves the case of the elements:
a={'abc' 'DEFG'};Here is the resulting matrix:
A abc DEFGNote that the string length is still 4.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.