Newsgroups: comp.lang.apl
Path: watmath!watserv2.uwaterloo.ca!watserv1!AGRTQB@IRMFAO01.BITNET
From: agrtqb%irmfao01.bitnet@utcs.utoronto.ca
Subject:      Questions using J version 5
Message-ID: <920831.093911.ITA.AGRTQB@IRMFAO01>
X-Acknowledge-To: <AGRTQB@IRMFAO01>
Sender: root@watserv1.uwaterloo.ca
Organization: Food and Agriculture Organization of the UN
Date: Mon, 31 Aug 1992 09:39:11 GMT


Using J version 5 (from APL92) we encountered some problems or bugs

a) external function save workspace

      NB. from `Programming in J` page 20

      Save=. 2!:2

      Save <'abc'


      Copy=. 2!:4
      Copy <'abc'


      NB. but the file has been created as it is shown with read
      read=. 1!:1
      y=.read <'abc'
      y

                 NB. not quite what I get on the PC see PS

b) with the Member of Interval

      NB. from `Dictionnary of J` page 34
      'co' E. 'cocoa'

      (0 1 +/ i. 3) E. 4 | +/~ i. 5


c) with the fit function

      x=. 20.5 20.6
      y=. 20.52 20.61
      x=y

      x =!.0.2 y

      x =!. 10^_2 y       NB. sorry it is 10caret_2 see PS

      x =!.(10^_2) y


d) How do you, in a explicit function, create a prompt for input, like:

Enter your name:

cursor waiting after the colon; on the same line on the PC it would be
interesting to have 1!:2 (2) writing to the screen without carriage
return nor line feed, this would allow to use the ANSI escape screen
handling.

Thanks

Alain Delmotte     Agrometeorology / FAO         or   Avenue du Marathon, 6
                   Via delle Terme di Caracalla       B1348 Louvain-la-Neuve
                   I00100 Rome ITALY                  BELGIUM
                   tel.: Italy-6-5797 5504            Belgium-10-45 11 92

PS moving file from the PC to the mainframe I get incorrect characters
   as well as when I receive files or messages from the network; this
   most of the time concerns the square brackets and caret, sometimes the
   stile. Solutions?
