如何查找随机访问文件结构

时间:2015-09-16 15:38:51

标签: random-access

有没有办法以编程方式确定" flat"的UDT结构?使用UDT创建的随机访问(又名直接访问)文件?

据我所知,没有EOL字符或任何可用于标记数据点的内容,但我希望我错了。

PB示例

TYPE StudentRecord
  LastName     AS STRING * 20 ' A 20-character string
  FirstName    AS STRING * 15 ' A 15-character string
  IDnum        AS LONG        ' Student ID, a Long-integer
  Contact      AS STRING * 30 ' Emergency contact person
  ContactPhone AS STRING * 14 ' Their phone number
  ContactRel   AS STRING * 8  ' Relationship to student.
  AverageGrade AS SINGLE      ' Single-precision % grade
END TYPE

DIM Student AS StudentRecord

Student.LastName = "Anderson"
Student.FirstName = "Bob"
Student.IDnum = 494425610
Student.Contact = "Ma Anderson"
Student.ContactPhone = "(800) BOBSMOM"
Student.ContactRel = "Mother"
Student.AverageGrade = 98.9

PUT #fileNumber, recordNumber, Student

我想在此示例中以编程方式查找StudentRecord的结构。

0 个答案:

没有答案