skn@mentor.cc.purdue.edu (Doug Stevens) (01/19/90)
I've got a question, about the FIELD command in GFA Basic 3.0. I'm trying to use the FIELD command to save some strings of data. Below is a section of code to save some strings. ' ********************************************************** OPEN "R",#1,"OBJECTS.DAT",5602 FIELD #1,1 AT(*vertices_adr),1 AT(*faces_adr),1600 AT(*x_vert_adr),1600 AT(*y_vert_adr),1600 AT(*z_vert_adr),200 AT(*point_a_adr),200 AT(*point_b_adr),200 AT (*point_c_adr),200 AT(*face_color_adr) FOR loop%=0 TO number_of_objects vertices_adr=VARPTR(vertices|(loop%)) faces_adr=VARPTR(faces|(loop%)) x_vert_adr=VARPTR(x_vertice(loop%,1)) y_vert_adr=VARPTR(y_vertice(loop%,1)) z_vert_adr=VARPTR(z_vertice(loop%,1)) point_a_adr=VARPTR(point_a|(loop%,1)) point_b_adr=VARPTR(point_b|(loop%,1)) point_c_adr=VARPTR(point_c|(loop%,1)) face_color_adr=VARPTR(face_color|(loop%,1)) PUT #1 NEXT loop% CLOSE #1 ' ********************************************************** This code is suspose to create a file OBJECTS.DAT. This code seems to work alright. The code to read in the data is the same except instead of a PUT statement there is a GET statement. The data read in is scrambled, if you have any suggestions it would be a great help. Thanks, Doug