Data type 160

APL-related discussions - a stream of APL consciousness.
Not sure where to start a discussion ? Here's the place to be
Forum rules
This forum is for discussing APL-related issues. If you think that the subject is off-topic, then the Chat forum is probably a better place for your thoughts !

Data type 160

Postby rpullman on Tue Mar 09, 2010 2:37 am

Why do I get a domain error with data ⎕nappend ntie when 160=⎕DR data? I am running Rel 12.0.5 on 64-bit Vista box.
rpullman
 
Posts: 12
Joined: Sun Dec 27, 2009 9:29 pm
Location: Chicago

Re: Data type 160

Postby rpullman on Tue Mar 09, 2010 2:58 am

I mean, why not default to the same data type as the left argument
rpullman
 
Posts: 12
Joined: Sun Dec 27, 2009 9:29 pm
Location: Chicago

Re: Data type 160

Postby Morten|Dyalog on Tue Mar 09, 2010 4:10 pm

The first cut at the design did default the data type as you suggest. However, we quickly discovered that if you output text to a native file in several pieces and some of them happen not to have any characters above number 255 (for example if you appended some blanks to the file), you would end up with a file in which some of the characters consumed 2 bytes each, and others consumed a single byte. This would almost definitely cause a problem for anyone trying to read the file.

Therefore, we decided to require an explicit width declaration when appending characters to a native file in the Unicode edition.
User avatar
Morten|Dyalog
 
Posts: 394
Joined: Tue Sep 09, 2008 3:52 pm


Return to APL Chat

Who is online

Users browsing this forum: No registered users and 1 guest