Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!cs.utexas.edu!sdd.hp.com!apollo!keil
From: keil@apollo.hp.com (Mark Keil)
Subject: Re: File I/O in J.
Lines: 22
Message-ID: <1992Jan29.035409.1839@apollo.hp.com>
Summary: Raw bianry data?
Keywords:   J binary structs
Sender: netnews@apollo.hp.com (USENET posting account)
Nntp-Posting-Host: thor.ch.apollo.hp.com
Organization:    Where?
References: <1992Jan28.024028.18052@newstand.syr.edu> <ROCKWELL.92Jan28091229@socrates.umd.edu>
Date: Wed, 29 Jan 1992 03:54:09 GMT

In article <ROCKWELL.92Jan28091229@socrates.umd.edu> rockwell@socrates.umd.edu (Raul Deluth Miller-Rockwell) writes:
> Bin Li:
>    Hi, Could someone show me how to read/write an array from/to an
>    external file (binary or decimal)?  Thanks.
> 
>    (Raul shows various ways to read/write ASCII or J objects, good stuff  [all deleted])

  Ok, I can read & write ASCII & J objects. How would you go about reading
  RAW bainary stuff written as C structs? How would you do the conversions
  for all the different C types {assuming one knows the struct layout)?

  This also bring up the question of how data is stored internally in J.

  I suspect that J Booleans are stored as bits, and J strings are stores
  as chars (zreo terminated?), intergers are stored as 32 bit ints,
  and floats are stored as double precision floats. Is this true?

Mark
-- 
 Mark Keil               HP/Apollo Computer,  Chelmsford MA 01824
 +1 508-256-6600 x4542   keil@apollo.hp.com  /  {decvax,mit-erl,yale}!apollo!keil

