susu #6270(2008/05/08 08:21 GMT) [ OCaml ] Rating0/0=0.00
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
type daily_menu = { dinnar : string; lunch : string; breakfast : string; date : int; } type person = { menus : daily_menu array; month : int; year : int; age : int; sex : char; name : string; family : string; } let main filepath = let in_file = open_in filepath in let create len (*in_file*) = let s = String.create len in really_input in_file s 0 len; s in Array.init 500 (fun _ -> { family = create 12; name = create 12; sex = (create 1).[0]; age = int_of_string (create 3); year = int_of_string (create 4); month = int_of_string (create 2); menus = Array.init 31 (fun _ -> { date = int_of_string (create 2); breakfast = create 500; lunch = create 500; dinnar = create 500; } ) } );;
Rating0/0=0.00-0+
[ reply ]
susu
#6270()
[
OCaml
]
Rating0/0=0.00
先に評価されてしまうので、typeの項目を逆さにしました。
Rating0/0=0.00-0+
[ reply ]