Form DEMO_THREADED_TIMER_FORM /******************************************************************************/ /* */ /* COPYRIGHT (c) 1995 */ /* DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */ /* */ /* THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED */ /* ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE */ /* INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER */ /* COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY */ /* OTHER PERSON. NO TITLE TO AND OWNERSHIP OF THE SOFTWARE IS HEREBY */ /* TRANSFERRED. */ /* */ /* THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE */ /* AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT */ /* CORPORATION. */ /* */ /* DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS */ /* SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL. */ /******************************************************************************/ /* DECforms : Pthreads output example */ /* Normal (MAIN) RECEIVE record */ /* TIMER SEND record */ Form Data F1 Character(8) F2 Character(8) TIMER_FIELD Character(23) End Data Form Record MAIN F1 Character(8) F2 Character(8) End Record Form Record TIMER TIMER_FIELD Character(23) End Record Layout VT_LAYOUT Device Terminal Type %VT100 End Device Size 24 Lines by 80 Columns Viewport MAIN_VIEWPORT Lines 4 Through 24 Columns 1 Through 80 End Viewport Viewport TIMER_VIEWPORT Lines 1 Through 3 Columns 1 Through 80 End Viewport Function Up Item is %UP End Function Function Down Item is %DOWN End Function Send Response TIMER Display TIMER_PANEL End Response Receive Response MAIN Let F1 = "" Let F2 = "" Activate Panel MAIN_PANEL End Response Disable Response Remove All End Response Panel MAIN_PANEL Viewport MAIN_VIEWPORT /* This is the regular panel for normal activity */ Use Help Message "Press ^Z or F10 to exit program." Apply Field Default Of Active Highlight Reverse End Default Literal Text Line 2 Column 22 Value "At the top, we update the date and time" End Literal Literal Text Line 3 Column 22 Value "every second using a separate thread routine." End Literal Literal Text Line 11 Column 32 Value "Field 1" End Literal Field F1 Line 11 Column 41 Uppercase End Field Literal Text Line 8 Column 29 Value "Leave both fields blank" End Literal Literal Text Line 9 Column 29 Value "to exit the program." End Literal Literal Text Line 12 Column 32 Value "Field 2" End Literal Field F2 Line 12 Column 41 Uppercase Function Response Next Item Return End Response End Field Literal Polyline Line 6 Column 24 Line 6 Column 58 Line 13 Column 58 Line 13 Column 24 Line 6 Column 24 End Literal End Panel Panel TIMER_PANEL Viewport TIMER_VIEWPORT /* This is the panel for TIMER fields */ Literal Rectangle Line 1 Column 27 Line 3 Column 55 End Literal Field TIMER_FIELD Line 2 Column 31 /* /* The picture is 20 instead of 23 so that we'll only /* show the seconds, and not the fractions of a second. /*/ Output Picture X(20) Display Bold Reverse End Field End Panel End Layout End Form