Author Topic: UG GRIP  (Read 897 times)

nowcad

  • Administrator
  • Hero Member
  • *****
  • Posts: 1808
    • View Profile
    • NowCAD
UG GRIP
« on: July 08, 2012, 06:10:41 pm »
One pair GRIP beginners helpful articles
 
 of UG the Open / Grip language summary of the Concise Guide to Grip the language with complete syntax rules, the program structure. Internal function. Grip program must be compiled. Connection. generate an executable file to run. Grip procedures to achieve a variety of interoperability with the UG. such as the creation of geometry file management control of system parameters. UG database access. This article summarizes the Grip language syntax. together with annotations to explain.
 
 $ $ comment
 
 $ $ Grip start and compiled: first find the UG installation path such as C: \ Program Files \ EDS \ Unigraphics NX.
 
 $ $ to enter the directory of the path UGOPEN. find grade.bat file to open it. the environmental. variable base_dir
 
 $ $ is set to the set base_dir = C, : \ Program Files \ the EDS \ the Unigraphics the NX Save and run
 
 $ $ Grip procedures for the preparation and compilation: In the Grip of running the program. type. you write Grip where the program objectives
 
 $ $ was recorded to write and press Enter. Grip run the program. type 1. Write a New Grip the program's file name and press Enter, at this time
 
 $ $ Grip will open WordPad. You can write your program. Grip run the program type.
 
 $ $ compile the file name to write compile error-free. type 3. write the file name link. link error-free.
 
 $ $ you write Grip programs are saved as *. grs files compiled Grip will generate * gri file. link Grip will be after
 
 $ $ generated *. the grx file. This file is the Grip run the file.
 
 $ $ Grip program run: open of UG. click File -> Execute-> Grip. *. grx files. can run it.
 
 $ $ compiler should be compiled first subfunction file, generate *. gri. Functions do not need to file links. at this time compile the main function
 
 $ $ file generated * gri last link into *. grx
 
 $ $ Grip the main function file must end in order to HALT Grip Functions The file must end with RETURN
 
 $ $ defined variables can not be more than six characters. Grip think Point_1, and Point_2 is the same variable.
 
 $ $ and his party can not exceed 80 the characters. wrap available $ sign.
 
 $ $ Grip case-insensitive. Grip POINT and point to draw point function, but I recommend Grip
 
 $ function name and the keyword is capitalized. user-defined variables in lowercase, but the user-defined variables can not and Grip
 
 $ $ function name and keywords the same name. <br / >
 $ $ Grip the help file in C: \ the EDS \ the Unigraphics the NX \ UGDOC \ html_files \ mainlibrary.chm \
 
 $ $ the Open \ the GRIP Reference Guide. an easy Grip function Find: Open ... \ Word &
 
 $ $ Symbol Lists \ Major Word List. according to the first letter to check the function.
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 ENTITY / p, l, c $ $ instance variable definition
 
 NUMBER / i, f (5) $ $ numeric variable definitions
 
 STRING / str (10) $ $ string variable definition
 
 p = the POINT / 0,0,0 $ $ painting point
 
 l = the LINE / 0,0,0,1,1,1 $ $ drawing a line
 
 c = CIRCLE / CENTER, p, RADIUS, $ $ circle
 
 the HALT $ $ Conclusion
 
 comment
 
 ENTITY is / p (3)
 
 NUMBER / a (3), b (3,3)
 
 DATA / b, 1,2,3,4,5,6,7,8,9 $ $ to b vector assignment
 
 a (1 .. 3) = b (1, 1 .. 3) $ $ for a vector is equal to the first value in the b vector
 
 p (1) = the POINT / a (1 .. 3)
 
 p ( 2) = POINT / b (2,1 .. 3)
 
 p (3) = POINT / b (3,1 .. 3)
 
 HALT $ $ Conclusion
 
 $ $ comment
 
 STRING/str1 (100) $ $ custom string
 
 str1 = 'Hello World' $ $ for string assignment
 
 MESSG/str1 $ $ string
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 $ $ + , -, *, /, ** = $ $ arithmetic function
 
 $ $ SQRTF, LOGF, ABSF, the INTF, the MODF flag, MINF, MAXF, SINF, COSF, ASIN F, ACOSF, ATANF $ $ mathematical functions
 
 $ $ '$' line breaks
 
 NUMBER / aa = SINF (30) MESSG / FSTR (a) the HALT $ $ Conclusion
 
 $ $ comment
 
 NOTE / 0,0, 'LABEL1' $ $ to print text UG display area
 
 the PRINT / 'LABEL2' $ $ to INFOMATION print text
 
 MESSG / 'LABEL3' $ $ to the message box to print text
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 STRING/str1 (100), str2 (100)
 
 NUMBER / strlen
 
 str1 = 'abcdefghijklmn'
 
 str2 = SUBSTR (str1, 2 , 5) $ $ to take the character
 
 strlen = LENF (str1) $ $ to take the length of the string
 
 PRINT / FSTR (3.14) $ $ floating-point conversion to a string
 
 PRINT / ISTR (strlen) $ $ integer convert string
 
 PRINT/str2
 
 the HALT $ $ Conclusion
 
 $ comment
 
 NUMBER / a (3), b (3), and c, d (3), the e, f (3), g (3)
 
 DATA / a, 1,2,3
 
 DATA / b, 4,5,6
 
 c = DOTF (a, b) $ $ vector dot product
 
 d = CROSSF (a, b) $ $ vector cross product
 
 e-= VLENF (a) $ $ orientation of the amount of mold
 
 f = SCALVF (10, a) $ $ the number of vectors multiplied
 
 g = UNITF (a) $ $ vector normalized
 
 PRINT / FSTR (c)
 
 PRINT / FSTR (d (1)) + ',' + FSTR (d (2)) + ',' + FSTR (d (3))
 
 PRINT / FSTR (e)
 
 PRINT / FSTR (f (1)) + ',' + FSTR (f (2)) + ',' + FSTR (f (3))
 
 PRINT / FSTR (g (1)) + ',' + FSTR (g (2)) + ',' + FSTR (g (3))
 
 HALT $ $ Conclusion
 <br / $ $ Note
 
 ENTITY/c1 c2, the l1
 
 ENTITY/p1, p2, p3, p4, the p5, p6, p7, p8
 
 c1 = CIRCLE / CENTER, (POINT / 1,0,0), RADIUS, 1
 
 c2 = CIRCLE / CENTER, (POINT / 2,0,0), RADIUS, 1
 
 l1 = LINE / 0,0,0, -1,0,0
 
 p1 = POINT / CENTER, c1 $ $ to take the center
 
 p2, = POINT / YLARGE, INTOF, c1, c2 $ $ to take along the y direction, the intersection of
 
 p3, = the POINT / YSMALL, INTOF, c1, c2 $ $ taken along the y direction, the smallest intersection of <br / >
 p4 = POINT / (POINT / 0, -1,0), INTOF, c1, c2 $ $ to take away (POINT / 0, -1,0) point the nearest point
 <br / > p5 = POINT/p1, VECT, (LINE/p2, p3), YLARGE, 2 $ $ so that p1 points along the the p2p3 vector to the maximum y direction offset
 
 p6 = POINT/c1 ATANGL, 45 $ $ to take a round 45-degree angle points
 
 p7 = POINT/p1 the DELTA, -2, -2,0 $ $ so that p1-point bias (-2, -2,0) p8 = POINT / ENDOF, XSMALL, l1 $ $ to take the l1 line endpoint
 
 the HALT $ $ Conclusion
 
 $ comment
 
 ENTITY is / c
 
 ENTITY/ln1, ln2, ln3, ln4, ln5, ln6, ln7
 
 c = CIRCLE / CENTER, (POINT / 0,0,0), RADIUS, 1
 
 ln1 = LINE / 0,0,0,1,0,0
 
 ln2 = LINE / PARLEL, ln1, YLARGE, 1 $ $ along the y maximum direction parallel to the ln1 line offset 1
 
 ln3 = LINE / PARLEL, ln1, YSMALL, TANTO, c $ $ along ln1 and c circle tangent parallel to the y minimum direction
 
 ln4 = the LINE / (POINT / 0,0,0), ATANGL, 45 $ $ too (0,0,0) to draw the 45 degree line
 
 ln5 the LINE / (POINT / 2,0,0) RIGHT, TANTO, c $ $ too (2,0,0) round cut c (right-hand side)
 
 ln6 = the LINE / (the POINT / 0,0,0), PARLEL, ln5 $ $ too (0,0,0) parallel ln5 line
 
 ln7 = the LINE / (the POINT / 0,0,0), PERPTO, ln5 $ $ too (0,0,0) vertical ln5 line
 
 the HALT $ $ Conclusion
 
 $ $ Note
 
 ENTITY/c1, c2, c3, c4, c5, c6
 
 c1 = CIRCLE / CENTER, (POINT / 0,0,0), RADIUS, 1 $ $ the center of the circle and the radius of the circle
 
 c2 = CIRCLE / CENTER, (POINT / 0,0,0) , TANTO, (LINE / 2,0,0,2, 2,0), START, 0, END, 90 $ $ the center of the circle with the line tangent to the start angle end angle
 
 c3 = CIRCLE / CENTER, (POINT / 0,0,0), (POINT / 3,0,0) $ $ the center of the circle and point
 
 c4 = CIRCLE / (Point / 4,0,0) (POINT / 0,4,0), (POINT/-4, 0, 0) $ $ over three o'clock circle
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 NUMBER / p (5,3)
 
 ENTITY / sp
 
 DATA / p, 0,0,0,1,1,0, 2,4,0,3,9,0,4,16,0
 
 sp = SPLINE / (POINT / p (1,1 .. 3)), (POINT / p (2, 1 .. 3)), (POI NT / p (3,1 .. 3)), $
 
 (POINT / p (4,1 .. 3)), (POINT / p ( 5,1 .. 3)) $ $ too the stipple diverse curves (not closed)
 
 sp = SPLINE / the CLOSED (POINT / p (1,1 .. 3)), (POINT / p (2,1 .. 3)), $
 
 (POINT / p (3,1 .. 3)), (POINT / p (4,1 .. 3)), (POINT / p (5,1 .. 3))
 
 $ $ over the stipple variety of curve (closed)
 
-the HALT $ $ Conclusion
 
 $ $ comment
 
 ENTITY is / ln (4)
 
 ENTITY/sph1, sph2 block1, cone1, cone2, cyl1, solid1, so lid2
 
 sph1 = the SPHERE / CENTER (the POINT / 0,0,0), RADIUS, 1 $ $ painting ball
 
 sph2 = the SPHERE / (CIRCLE / CENTER, (Point / 0,0,0) RADIUS, 2) $ $ painting ball
 
 block1 = SOLBLK / Origin, 2,2,2, SIZE, 1,1,1 $ $ painting box
 
 cone1 = SOLCON / Origin, 3,3,3, HEIGHT, 1, DIAMTR, 1,0 $ $ painting cone
 
 cone2 = SOLCON / of ORIGIN, 4,4,4, HEIGHT, 1, DIAMTR, 1 , 0.5, AX IS, 1,0,0 $ $ Circle Taiwan
 
 cyl1 the = SOLCYL / of ORIGIN, 5,5,5, HEIGHT, 1, DIAMTR, 1 $ $ painting cylindrical
 
 ln (1) = LINE / 0,0,0,1,0,0
 
 ln (2) = LINE / 1,0,0,1,1,0
 
 ln (3) = LINE / 1,1,0,0,1,0
 
 ln (4) = LINE / 0,1,0,0,0,0
 
 solid1 = SOLEXT / ln (1 .. 4), HEIGHT, 10, AXIS, 0,0,1 $ $ stretch entity
 
 solid2 = SOLREV / ln ( 1 .. 4), ORIGIN, 0,0,0, ATANGL, 360, AXI S, 1,0,0 $ $ rotation entities
 
 the HALT $ $ Conclusion
 
 $ comment ENTITY/ln1, ln2 ENTITY/flt1, pl1, torus1 the NUMBER / p_coords (3) & the FONT = & DASHED $ $ linear dotted line to become
 
 ln1 = the LINE / 0,0,0 1,0,0
 
 & FONT = & SOLID $ $ linetype become solid line
 
 ln2 = the LINE / 0,0,0,0,1,0
 
 flt1 = FILLET/ln2, ln1, CENTER (POINT / 1,1,0), the RADIUS, 0 2, NOTRIM $ $ painting rounding
 
 pl1 = PLANE / (POINT / 0,0,0), (the POINT / 1,0,0), (the POINT / 0,1,0) $ painted flat
 
 torus1 = SOLTOR / of ORIGIN, 0,0 0, The RADIUS 1,0.5
 
 p_coords = CPOSF (ln1, 0.25) $ $ to take line mid-point
 
 the HALT $ $ Conclusion
 <br / $ $ Note
 
 ENTITY/b1, b2, b3, b4, b5,, b6 are, b7, b8, b9
 
. b1 = SOLBLK / of ORIGIN, 0,0,0 , SIZE, 2,2,2
 
 b2 = SOLBLK / ORIGIN, 1,1,1, SIZE, 2,2,2
 
 b3 = SOLBLK / ORIGIN, 2 , 2,2, SIZE, 2,2,2
 
 b4 = SOLBLK / ORIGIN, 3,3,3, SIZE, 2,2,2
 
 b5 = SOLBLK / ORIGIN, 4,4,4, SIZE, 2,2,2
 
 b6 = SOLBLK / ORIGIN, 5,5,5, SIZE, 2,2,2
 <br / > b7 = UNITE/b1, WITH, b2 $ $ entity sum
 
 b8 = INTERS/b3, WITH, b4 $ $ entities intersect
 
 b9 = SUBTRA/b5 The WITH, b6 $ $ entity subtract
 
 the HALT $ $ Conclusion
 
 $ comment
 
 NUMBER/mat1 (12), mat2 (12) mat3 (12), mat4 (12)
 
 NUMBER/gmat1 (12), gmat2 (12), mat (12)
 
 ENTITY/ln1, b1, b2
 
 ln1 = LINE / 0,0,0,0,1,0
 
 b1 = SOLBLK / ORIGIN, 0,0,0, SIZE, 1,1,1
 
 mat1 = MATRIX / TRANSL, 1,2,3 $ $ generated translation matrix
 
 mat2 = MATRIX / XYROT 45 $ $ generate a rotation matrix
 
 mat3 = MATRIX / MIRROR, ln1 $ $ to generate the mirror matrix
 
 mat4 = MATRIX / SCALE $ $ generated scaling matrix
 
 gmat1 = MATRIX/mat1 mat2 $ $ matrix multiplying
 
 gmat2 = MATRIX/mat3 mat4 $ $ matrix multiplication
 
 mat = MATRIX/gmat1 gmat2 $ $ matrix by multiplying
 
 b2 = TRANSF / mat, b1 $ $ transformation matrix of the object added to the object
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 ENTITY is / csys1, csys2, csys3
 
 csys1 = CSYS / (POINT / 1,1,0), (POINT / 1,2,0), (POINT / 0,1, 0) $ $ input origin, x-axis point, the y-axis points to establish the coordinate system
 
 & the WCS = csys1 $ $ to take the current coordinate system built for the above coordinate system
 
 csys2 = CSYS / (LINE / 0,0,0,1,1,0), (LINE / 0,0,0, -1,1,0) $ $ input x-axis and y-axis coordinate system
 <br / > & WCS = csys2
 
 csys3 = CSYS/csys2, ORIGIN, (POINT / 1,1,1) $ $ will be coordinate system csys2 moved to the other point
 
 the WCS = csys3
 
 & WCS = & ABS $ $ will move the coordinate system to the absolute coordinate system
 
 HALT $ $ Conclusion
 
 $ $ comment <br / >
 ENTITY / p (3), grp1, grp2
 
 p (1) = POINT / 0,0,0
 
 p (2) = POINT / 1,1,1
 
 p (3) = POINT / 2,2,2
 
 grp1 = GROUP / p (1 .. 2) $ $ combination of entities
 
 grp2 = GROUP/grp1, p (3) UNGRP/grp2 $ $ canceled combinations
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 NUMBER / index
 
 index = 4
 
 IF / index == 1, JUMP/A1: $ $ conditional statement
 
 IF / index == 2, JUMP/A2:
 
 IF / index == 3, JUMP/A3:
 
 JUMP / END: $ $ jump statement
 
 A1:
 
 MESSG / 'index = 1'
 
 JUMP / END:
 
 A2:
 <br / > MESSG / 'index = 2'
 
 JUMP / END:
 
 A3:
 
 MESSG / 'index = 3'
 
 JUMP / END:
 
 END:
 
 MESSG / 'END'
 
 HALT $ $ Conclusion
 
 $ $ the annotation
 
 DO/LOOP1:, i, 1,10,1 $ $ loop
 
 PRINT / ISTR will (i) the
 
 LOOP1 :
 
 PRINT / 'END'
 
 the HALT $ $ Conclusion
 
 $ $ Note
 
 NUMBER / p (5 , 3)
 
 DATA / p, 0,0,0,1,1,1,2,2,2,3,3,3,4,4,4
 
 DO/LOOP1: i, 1,5,1 double loop
 
 DO/LOOP2:, j, 1,3,1
 
 PRINT / ISTR will ( p (i, j))
 
 LOOP2:
 
 LOOP1:
 
 PRINT / 'END'
 
 HALT $
 $ $ Conclusion
 comment
 
 $ $ == equal to, <> not equal <less than> greater than <= less than or equal to > = greater than or equal to, NOT, AND and, OR, or
 
 NUMBER / index order
 
 index = 1
 
 the order = 1
 
 IF / index == 1, MESSG / 'index = 1' $ $ a single condition statement
 
 IF / index == 2, MESSG / 'index = 2'
 
 IF / index == 3 AND the order == 1 MESSG / 'index = 3'
 
 the HALT $ $ Conclusion
 
 $ comment
 
 NUMBER / a, b
 
 a = 2
 
 b = 1
 
 IFTHEN / a> b $ $ more than conditional statement MESSG / 'a> b' The ELSEIF / a <the b MESSG / 'a <b' the ELSE MESSG / 'a = b' the ENDIF the HALT $ $ Conclusion
 
 $ $ comment
 
 NUMBER / A, B
 
 A = 2
 
 B = 2
 
 IFTHEN / A <0 $ $ nested loop
 
 MESSG / 'A <0'
 
 ELSEIF / A> 0
 
 IFTHEN / B> 0
 
 MESSG / ' A> 0, B> 0 '
 
 ELSE
 
 MESSG /' A> 0, B <0 '
 
 ENDIF
 
 the ELSE
 
 MESSG / '= 0'
 
 the ENDIF
 
 the HALT $ $ Conclusion
 
 $ $ Notes
 
 ENTITY / ln (4)
 
 ln (1) = LINE / 0,0,0,1,0,0
 
 ln (2) = LINE / 1,0,0,1,1,0
 
 ln (3) = LINE / 1,1,0,0,1,0
 <br / > ln (4) = LINE / 0,1,0,0,0,0
 
 CALL / 'test24sub', ln $ $ call Functions. a function name. behind to preach the into the formal parameter
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 PROC / ln $ $ subfunction header contains the incoming parameter
 
 ENTITY / ln (4) $ $ defined parameter variables
 
 ENTITY/body1 $ $ subfunction body
 
 body1 = SOLEXT / ln Height, 1, AXIS, 0,0,1
 
 RETURN $ $ Conclusion
 
 $ $ comment -1
 
 NUMBER / an RESP, NRESP IRESP, GRESP, PRESP, ORESP
 
 STRING / your_name (100), your_gender (100)
 
 NUMBER / your_id, your_mathmatic, your_english, your_ch inese
 
 NUMBER / p_x, p_y, p_z, obj_num
 
 ENTITY / your_object (100)
 
 BACK:
 
 $ $ Select function name of the menu: / tips. Menu 1 Menu 2 ...... (up to 14 menu). user response value
 
 The CHOOSE / 'Choose operation type', 'Input Name', 'the Input the Info' , $
 
 'Input Gender', 'Input Point', 'Select Object', 'Finish', RESP
 
 $ $ value of an RESP User Response: 1 - When the user clicks Back button - the program jump to BACK: Department
 
 $ $ 2 - When the user clicks the Cancel button - the program jump to the END: Department
 
 $ $ 3 - The response value useless - no jump
 
 $ $ 4 - When a dialog box when the user needs to be nested - no jump
 
 $ $ 5 - When the user clicks on the Input Name button - program jump to the MENU1: Department
 
 $ $ 6 - When users click on the Input Info button - the program jump to MENU2: Department
 
 $ $ ...
 
 $ $ 10 - when the user clicks on the Finish button - the program jump to MENU6: Department
 
 $ $ user response value
 
 JUMP / BACK: , END:,,, MENU1:, MENU2:, MENU3:, MENU4:, MENU 5:, MENU6:, RESP
 
 MENU1:
 
 $ $ when the user clicks Input Name button. out of string input box
 
 $ $ function name / prompt return to the variable. user response value
 
 the TEXT / 'Input your name', your_name, NRESP
 
 $ $ User Response Value NRESP: 1 - When the user clicks the Back button - the program jump to BACK to: Office
 
 $ $ 2 - When the user clicks the Cancel button - the program jump to END: at $ 3 - when the user does not have the input string and click the OK button - Jump
 
 $ $ 4 - When a dialog box when the user needs to be nested - no jump
 
 $ $ 5 - When the user input string and click the OK button - the program jump to BACK: Department
 
 $ $ user response value
 
 JUMP / BACK:, END:,,, BACK:, NRESP
 
 MENU2:
 
 $ $ when the user clicks on the Input Info button. out of the parameter input box
 
 $ function name / tips. parameter 1 name keyword indicates that this parameter is an integer. return variables 1.
 
 $ $ parameter 2 name. no keyword indicates that this parameter is a floating-point type. return variables
 
 $ $ parameter 3 name. variable parameter name. variable 4 user response value
 
 PARAM / 'Input your information' , 'ID', INT, your_id, $
 
 'Mathmatic', your_mathmatic, 'English', $
 
 your_english, 'Chinese', your_chinese, IRESP
 
 $ $ User Response the value IRESP: 1 - When the user clicks the Back button - program skip BACK: Department
 
 $ $ 2 - When the user clicks the Cancel button - the program to jump to the END: Department
 
 $ $ 3 - When the user clicks on the OK button - the program jump to BACK: Department
 
 $ $ 4 - When a dialog box when the user needs to be nested - Jump
 
 $ $ User Response value
 
 JUMP / BACK:, END:, BACK:,, IRESP
 
 MENU3:
 
 $ $ when the user clicks on the Input Gender button. out of the dialog box
 
 $ comment -2
 
 The CHOOSE / 'Input your gender', 'Male' , 'Female', GRESP
 
 JUMP / BACK:, END:,,, GMENU1:, GMENU2:, GRESP
 
 GMENU1:
 
 your_gender = 'Male'
 
 JUMP / BACK:
 
 GMENU2:
 
 your_gender = 'Female'
 
 JUMP / BACK :
 
 MENU4:
 
 $ $ when the user clicks on the Input Point button. out of select point dialog
 
 $ $ function name / prompt. point x coordinate of the return to the coordinates of the point y. to return to the coordinates of the point z. user response value
 
 GPOS / 'the Input your point' p_x p_y, p_z PRESP
 
 $ $ User Response Value PRESP: 1 - When the user clicks the Back button - the program jump to BACK to: Office
 
 $ $ 2 - When the user clicks the Cancel button - the program jump to the END: Department
 
 $ $ 3 - When the user clicks on the OK button - the program jump to BACK: Department
 
 $ $ - this response values ​​useless - Jump
 
 $ $ 5 - When the user select a point - the program jump to BACK: Department
 
 $ $ User Response value
 
 JUMP / BACK:, END:, BACK:,, BACK to: , PRESP
 
 MENU5:
 
 $ $ when the user clicks on the Input Object button. out of select objects dialog box
 
 $ $ function name / prompt. return to physical variables. keyword indicates that allows multiple selected objects.
 
 $ $ to return to the selection of objects number. user response value
 
 IDENT / 'Input your the object', your_object, CNT, obj_num, ORESP
 
 $ $ User Response the value ORESP: 1 - When the user clicks the Back button - program jump to BACK: Department
 
 $ $ 2 - When the user clicks Cancel button - the program jump to the END: Department
 
 $ $ 3 - When the user clicks on the OK button - the program jump to BACK: Department
 
 JUMP / BACK:, END:, BACK :, ORESP
 
 MENU6:
 
 PRINT / 'Your Name:' + your_name
 
 PRINT / 'Your ID:' + ISTR (your_id)
 
 PRINT / 'Your Mathmatic:' + FSTR (your_mathmatic)
 
 PRINT / 'Your English:' + FSTR (your_english)
 
 PRINT / 'Your Chinese:' + FSTR (your_chinese)
 
 PRINT / 'Your Gender:' + your_gender PRINT / 'Your Point:' + FSTR (p_x) + '' + FSTR (p_y) + '' the + FSTR (p_z,) END: the HALT $ $ Conclusion
 
 $ $ comment
 
 ENTITY is / p (2)
 
 p (1) = the POINT / 0,0,0
 
 p (2) = POINT / 1,1,1
 
 DELETE / p (1) $ $ delete objects
 
 BLANK / p (2) $ $ hidden object
 
 UNBLNK / p (2) $ $ to restore the hidden objects
 
 EXPCRE / '= 1' $ $ establishment of expression type
 
 EXPCRE / 'b = 1'
 
 EXPDEL / 'b' $ $ delete expression
 
 the HALT $ $ Conclusion
 
 $ $ Note
 
 STRING/str1 (100), str2, (100)
 
 NUMBER/num1 num2
 
 $ $ the CREATE / PART, 'c: \ test_metric.prt', MMETER $ $ to create a new metric part file
 
 $ $ the CREATE / PART, 'c: \ test_english.prt', INCHES $ $ to create a new inch part file
 
 $ $ the FILE / the PART, 'the c: \ test_english.prt' $ $ to save the file
 
 $ $ ------------- ------------------------------------------------
 
 $ $ to create a new text file .1 indicates that the file pointer. new second file. file pointer 2
 
 CREATE / TXT, 1, 'the c: \ test.txt '
 
 WRITE / 1,' PI '$ $ to write the string
 
 WRITE / 1,3.14 $ $ to write the value
 
 the FILE / TXT, 1 $ $ to save the file
 
 FTERM / TXT $ $ off file
 
 $ $ ---------------- --------------------------------------------
 
 FETCH / TXT, 1, 'c: \ test.txt' $ $ to open a text file
 
 RESET / $ $ file insertion point set to the first line
 <br / > WRITE / 1, '2003-9-4 '$ $ in the first line of the file, write data
 
 the APPEND / $ $ file insertion point set to the last line
 
 WRITE / 1,1.414 $ $ the last line in the file to write data
 
 FILE / TXT
 
 FTERM / TXT,
 
 $ $ -------------------------------------------------- ---------
 
 FETCH / TXT, 1, 'c: \ test.txt'
 
 RESET / 1
 
 READ / 1, str1 $ $ to read out the first data
 
 the READ / 1, str2 $ $ to read out the second data
 
 READ / 1, num1 $ $ to read out third data
 
 the READ / 1, num2 $ $ to read out the fourth data
 
 PRINT/str1 + ',' + str2, + ', the' + FSTR (num1) + ',' + FSTR (num2)
 
 FTERM / TXT, 1
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 ENTITY / ln (4), obj
 
 STRING / str (100)
 
 ln (1) = LINE / 0,0,0,1,0,0
 
 ln (2) = LINE / 1,0,0,1,1,0
 
 ln (3) = LINE / 1,1,0,0,1 , 0
 
 ln (4) = LINE / 0,1,0,0,0,0
 
 & NAME (ln (1)) = 'FIST_LINE' $ $ for the name of the entity set
 
 & NAME (ln (2)) = the 'SECOND_LINE'
 
 & NAME (ln (3)) = 'THIRD_LINE' & NAME (ln (4)) = ' FORTH_LINE 'INEXTE / ALL $ $ to initialize all objects
 
 the LOOP:
 
 obj = NEXTE / IFEND, END: $ $ from the first objects start
 
 str = & NAME (obj) $ $ to get the name of the object
 
 IFTHEN / str == 'FORTH_LINE' $ $ If the name is equal to the root of the fourth line
 
 DELETE / obj $ $ delete it
 
 else
 
 JUMP / LOOP: $ $ otherwise re-circulation. to read the next one object
 
 the ENDIF
 
 END:
 
 the HALT $ $ Conclusion
 
 $ $ comment
 
 the HALT $ $ Conclusion
 <br / > The above information from the network