This repeats my previous message with the newlines relocated
to make it look better and with a couple of errors in the example
corrected.  My apologies for any inconvenience!

I have two questions.  First, I am trying to create and map some
files under program control using the jmf utilities.  Sometimes
when I create a jmf file and then try to map it to a variable name
I get a "bad jmf header" error message.  When I try the map_jmf_
operation manually rather than in the program, but using the jmf file
created by the program, it also gives the "bad jmf header" message.
But if I create the jmf file manually and then map it manually, it
works.  So the problem seems to have something to do with the
create_jmf_ step.

My second question involves using 7!:5 to estimate the file size
necessary for the mapped file to hold a particular boxed array.
(There is no problem with numeric or character arrays as I can just
multiply their number of elements by JINT, JFL, JCHAR, etc.).  I
hope the figures given by 7!:5 will be sufficient to avoid allocation
errors, but I am puzzled by behavior like the following:


   (1200$<a.)-:1200$<256{.a.
1
   (1200$<' ')-:1200$<32{a.
1
   (1200$<' ')-:1200$<32{a.
1
   7!:5 <'x'
8192
   x=.1200$<256$a.
   7!:5 <'x'
622592
   x=.1200$<256{.a.
   7!:5 <'x'
622592
   x=.1200$<128$a. 
   7!:5 <'x'
315392
   x=.1200$<' '
   7!:5 <'x'
8192
   x=.1200$<32{a.
   7!:5 <'x'
84992
   x=.1200$' '  NB. Unboxed
   7!:5 <'x'
2048

etc.

Granted that boxed arrays can sometimes require much more space than 
unboxed arrays, it does seem strange that the size required should
depend on how the arrays were originally constructed, before being
assigned to a noun.

Dick Vaughan


This message is intended only for the addressee and may contain information 
that is confidential or privileged. Unauthorized use is strictly prohibited and 
may be unlawful. If you are not the intended recipient, or the person 
responsible for delivering to the intended recipient, you should not read, 
copy, disclose or otherwise use this message, except for the purpose of 
delivery to the addressee. If you have received this email in error, please 
delete and advise the IT Security department at [EMAIL PROTECTED] immediately.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to