Please enable JavaScript to view this site.

A-Shell Reference

Navigation: » No topics above this level «

INFLD Character Type Codes

Scroll Prev Top Next More

 

 

Control Character Input

[ Type code = @ ] Works as a "fast" field to return the first n characters typed (where n is the value of xmin) , whether control characters or not. The only character you cannot retrieve this way is Ctrl+C. (You can trap that with ON ERROR GOTO or by using the V code.) Ordinarily you should specify a minimum of 0 or 1 for this to return a single control character properly. Also note that this code over-rides all other codes (where conflicting). See codes C and <.

Note that function keys will only return the first byte of the sequence (typically ASCII 7). ccc

 

Currency Field

[ Type code = $ ] Redisplays as "$$###,###,###.##". If  .  (period) code not used, displays with last 2 digits entered to the right of the decimal point. Otherwise inserts ".00" after the number entered (if hard decimal not entered) or simply formats the cents as ".#Z" (if hard decimal entered). Default decimal position and number of digits past the decimal point are adjustable with the maxpt and defpt parameters. Currency symbol is determined by the applicable Language Definition File (LDF). Note that the symbol may be one or two characters, with or without a space between it and the number, and it may appear before or after the number, depending on the LDF parameters. Also note that by setting defpt = -2, you can eliminate the decimal point and cents (for handling currency in whole numbers).

 

No/Yes Field

[ Type code = N ] When following a Y code, specifies a Yes/No field with "N" default (and pre-display). Otherwise, like # but does not display a "0" if nothing entered or supplied, and does display one blank after the marker characters. This is a useful alternative to the # code when the screen may be cluttered by the display of many fields containing 0 (e.g. "0", "0.00", "$0", etc. (See B to display the blanking.)

 

Phone Or Zip Code Input

[ Type code = P ] If xmax  = 7 or 10, specifies phone number and allows alphanumeric entry. Must be either 0, 7 or 10 characters. Redisplayed as "(###) ###-####" with the area code omitted if only 7 digits entered. If xmax  = 5 or 9, specifies zip code and allows numeric entry only. Must be either 0, 5 or 9 characters. Redisplayed as "#####-####", with the dash and last 4 digits used only if more than 5 digits entered. Note that this field ignores the language definition file, since there is no guarantee that the phone number or zip being entered actually belongs to the language of the current user. One solution is to prompt for the country first, and then if it is not USA, use alternate type codes for zip and phone.

 

Yes/No Field

[ Type code = Y ] Default to (and pre-display as) "Y", unless followed by a N code, or followed exclusively by an E or T code. (This is to maintain compatibility with INPUT's YE and YT.) The keyboard character "1" is interpreted as (and converted to) "Y" and "0" as "N" in Yes/No fields. Note that the English "Y" and "N" abbreviations may be changed by the language definition file (LDF) to more appropriate ones for the local language.

See the GUI-Related Codes topic for information on converting a Yes/No field to a checkbox.

 

Setdef Qualifier

Indicates that setdef contains a list of all the allowable characters. To be accepted, input characters must first pass the normal type code acceptance rules, and then must be listed within the setdef string. Consequently, to use setdef exclusively to specify the allowable characters, combine type codes { and A. Note that upper and lower case is significant when setdef is used this way. See the setdef topic.