From: Didier Morandi [Didier.Morandi@gmx.ch] Sent: Thursday, November 22, 2001 5:21 PM To: Info-VAX@Mvb.Saic.Com Subject: Re: DCL minute of the day: DCL$SMG routines $! DMo 21-aug-2001 $! DCL_SMG_DEMO.COM $ say = "write sys$output" $ say "This small procedure does a demo of the SMG routines for DCL" $ say "" $ say "STEP 1: Create virtual display" $ inq rows "enter number of lines for your display [10]" $ if rows .eq. 0 then rows = 10 $ inq cols "enter number of colums for your display [40]" $ if cols .eq. 0 then cols = 40 $ inq d_name "enter display name [WINDOW1]" $ if d_name .eqs. "" then d_name = "WINDOW1" $ inq border "do you wish your display to be bordered? [Y]/N" $ if border .eqs. "" then border = "Y" $ inq y_pos "enter line number for upper left corner of display [5]" $ if y_pos .eq. 0 then y_pos = 5 $ inq x_pos "enter column number for upper left corner of display [10]" $ if x_pos .eq. 0 then x_pos = 10 $ inq erase "erase screen first? [Y]/N" $ if erase .eqs. "" then erase = "Y" $ inq label "enter window title [''d_name']" $ if label .eqs. "" then label = d_name $ @dcl_routines - dcl$smg_create_virtual_display 'rows' 'cols' 'd_name' 'border' 'label' $ say "Virtual display ''d_name' successfully created in memory." $ say "" $ say "STEP 2: Fill display with text lines" $ i=1 !start put in line one (default for demo) $ i_col=1 !start put in column one (idem) $ i_max=rows $ say "Text default value for demo is ""This is line x.""" $ say "To enter a blank line, type a space" $LOOP: $ read/end=NEXT/prompt="Enter text for line ''i' (F10=end): " - sys$command line_'i' $ if line_'i' .eqs. "" then line_'i' = "This is line ''i'." $ line = line_'i' $ @dcl_routines dcl$smg_put_line "''line'" 'i' 'i_col' 'd_name' $ i=i+1 $ if i .gt. (i_max-2) then goto NEXT $ goto LOOP $NEXT: $ say "" $ say "STEP 3: paste display to terminal" $ inq dummy "Hit RETURN to start" $ if erase then @dcl_routines dcl$smg_clear_screen $ @dcl_routines dcl$smg_paste_virtual_display 'd_name' 'y_pos' 'x_pos' $ say "" $ say "STEP 4: unpaste display" $KOMON: $ inq dummy "Hit Y to unpaste display" $ if .not. dummy then goto KOMON $ @dcl_routines dcl$smg_unpaste_virtual_display 'd_name' $KOMON_BABY: $ inq dummy "Hit Y to exit" $ if .not. dummy then goto KOMON_BABY $ type/page nl: $ say "Thank you for playing with DCL$SMG routines." $ say "Source code for routines is DCL_ROUTINES.COM" $ say "Enjoy." $ exit D.