Comment detail

固定長データ (Nested Flatten)
普通に。
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
100 close #1
110 open "c:\固定長.dat" for input as #1
120 dim day$(31), breakfast$(31), lunch$(31), dinner$(31)
130 for record = 1 to 500
140   if eof(1) then goto *LoopEnd
150   'データの読み込み
160   family$ = input$(12, #1)
170   name$   = input$(12, #1)
180   sex$    = input$(1, #1)
190   age$    = input$(3, #1)
200   year$   = input$(4, #1)
210   month$  = input$(2, #1)
220   '日ごとデータの読み込み
230   for d = 1 to 31
240     day$(d)       = input$(2, #1)
250     breakfast$(d) = input$(500, #1)
260     lunch$(d)     = input$(500, #1)
270     dinner$(d)    = input$(500, #1)
280   next d
290   'データ出力
300   print "名前:";family$;" ";name$
301   print "31日の朝食:";mid$(breakfast$(31),1, 20)
310 next record
320 *LoopEnd
330 close #1

Index

Feed

Other

Link

Pathtraq

loading...