#3
Edit Routine - Editrtn.txt
' This is a sample edit subroutine for any user defined function that requires
' data entry such as Distance or Speed. This subroutine can be used as a
' guide for writing a user specific subroutine. This subroutine calls out for
' another subroutine called "GetValue", hence the two should be used
' together. As a suggestion, refer to the sample program "eltrmsmp.tsk"
' to see how this subroutine is used in a program.
' The following items are necessary when customizing a routine:
'
1.) Declaration of variables (except on MCPI-MA)
' -INTEGER row,col,keypress
'
-REAL value,min,max,distance
'
-STRING$ fmt$
' 2.) Determine the Screen Layout
'
-DISP 1,3,"Move Distance"
'
-DISP 2,1,"in inches="
' -DISP 4,1,"ESC-Exit ENTER-Edit"
'
3.) Determine max and min allowable values
' -min=-9999.9
' -max=9999.9
' 4.) Specify the number format using the fmt$ variable
' -fmt$="####.0"
' Hint: If max=99.9 set fmt$="##.0"
' If max=999.9 set fmt$="###.0"
'
5.) Determine row and column position of the number
' Hint: The row and column specify the location
' to position the Data on the screen.
Get_Distance:
CLRSCRN
' Clear Screen
DISP 1,3,"Move Distance"
' Print the followings messages
DISP 2,1,"in inches="
' to the screen.
DISP 4,1,"ESC-Exit ENTER-Edit"
fmt$="####.0"
' Define the length and layout
' of the parameter.
min=-9999.0
' Define min value.
max=9999.0
' Define max value.
Value=Distance
row=2
' Define the location to
col=11
' print the parameter.
LOCATE row,col ' Position cursor.
PRINT USING#2,fmt$,Value
' Prints initial number to the screen.
StockCheck.com