J is a single data multi-instruction language. The trains and many of the adverbs and conjunctions control data flow. enc2 is a hook. Below, find where A appears in the explicit equivalent sentence.

   boxdraw_j_ 1

   enc2 =: ;(</.~ 0 1 2 1 $~ #)

   enc2 A
+------------------+-----+---------+----+
|hi ho how are you?|howeu|ih o r o?| hay|
+------------------+-----+---------+----+

   A ; A </.~ (0 1 2 1"_ A) $~ # A
+------------------+-----+---------+----+
|hi ho how are you?|howeu|ih o r o?| hay|
+------------------+-----+---------+----+

Date: Thu, 08 Jan 2015 02:31:07 -0500
From: "Linda Alvord"<[email protected]>
To:<[email protected]>
Subject: Re: [Jprogramming] Rail Fence Cipher
Message-ID:<[email protected]>
Content-Type: text/plain; charset="koi8-r"

This is odd, Pascal
Remove @: in one situation and the results agree. However in a defined verb
they don't agree.
    A=:'hi ho how are you?'
    enc =: ;@:(</.~ 0 1 2 1 $~ #)
  ;@:(</.~ (0 1 2 1 $~ #))A

howeuih o r o? hay
   ;(</.~ (0 1 2 1 $~ #))A
howeuih o r o? hay

    enc2 =: ;(</.~ 0 1 2 1 $~ #)

enc2 A
-------------------T-----T---------T----?
?hi ho how are you??howeu?ih o r o?? hay?
L------------------+-----+---------+-----

Linda


-----Original Message-----
From:[email protected]
[mailto:[email protected]] On Behalf Of 'Pascal
Jasmin' via Programming
Sent: Wednesday, January 7, 2015 11:43 PM
To: Programming forum
Subject: [Jprogramming] Rail Fence Cipher


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to