Type Casting

Look again at figure 1. About the only thing you'll recognize (from "Define Screens" in the earlier programs) in the list

Dec 1 13:46

1983

File

Name :

concerts

Screen #1

Page

1

Cursor

path :

4

23

Concert Schedule

5

25

Name of Company:::::

*4

/ Alpha key:

*5

/

2

26

Artistic Director:::

(Last) *2

/

(First) *3

/

3

27

Type <*> if

Pentac le

member, <@> if concert

is to be audited: *1

TAB

TAB

1

29

Location of

Concert :

*6

/

6

TAB

Phone number

for reservations:

*7 /

Reservation made?

(y/n)

*8

7

12

TAB

16

Performance

Day

Date

Time Go?(+)

9

20

1

*9 /

*10 /

★11 / *12

10

24

2

*13

*14

*15 *16

11

28

3

* 17

*18

*19 *20

13

TAB

4

*2l

*22

★23 *24

14

8

5

*25

*26

★27 *28

15

17

Note: *29

/

18

19

Record number [email protected]

/

21

Created [email protected]

by

! @CB

/

22

Last batch update: Figure 2: Screen 1 Format and Cursor Path

Updated [email protected]

Last batch update: Figure 2: Screen 1 Format and Cursor Path of field types is """.This is the default type: letters, numbers, punctuation, and spaces. In Profile II and III, field types were defined when you set up your screens. In Profile 16, they are specified at file definition. This gives you access to a whole range of field edits that have two main purposes. First, they make data entry more accurate by permitting the user to enter only the type of information that is appropriate to a particular field. Second, they make data entry faster and easier because you can use them to create short-cuts— automatically formatting an entry or supplying characters, for instance.

The alphanumeric (" *") edit type is one of many system edits that govern entry of numbers, dates, and times. The"." edit allows digits and the decimal point, automatically supplying two decimal places and right-justifying the number in the field, ".n" works just like the preceding but supplies 0 to 8 decimal places, depending on what number replaces the "n". "F" indicates floating decimal format.

There are 12 kinds of date formats allowing almost any permutation; from slashed to unslashed, and from two- to four-digit years. More important, every one of them sorts properly! Entering "/" into a date field automatically supplies today's date in the requested format. Shortened entries involving slashes automatically "fill-out." For instance, if you type "4/1/84," it appears on the screen as "04/01/84." No fooling!

Finally, there are two time edits: HMS for hours:minutes-seconds, and TIME, which accepts 00:00:00 to 23:59:59. Entering a colon will supply the current time, and abbreviated entries will be expanded just as date entries are. The White Rabbit would have loved it. As you can see, I use the "MDY/" date edit for fields 10, 14, 18, 22, and 26.

System edits are built into the system and cannot be changed; they are simply there for you to take advantage of as you wish.

Was this article helpful?

0 0

Post a comment