Form DEMO_THREADED_TIMER_FORM /******************************************************************************/ /* */ /* © Copyright 2005 Hewlett-Packard Development Company, L.P. */ /* */ /* Consistent with FAR 12.211 and 12.212, Commercial Computer Software, */ /* Computer Software Documentation, and Technical Data for Commercial */ /* Items are licensed to the U.S. Government under vendor's standard */ /* commercial license. */ /* */ /******************************************************************************/ /* 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