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 $~ #) 

   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

 

from 

 
<http://www.reddit.com/r/dailyprogrammer/comments/2rnwzf/20150107_challenge_
196_intermediate_rail_fence/>
http://www.reddit.com/r/dailyprogrammer/comments/2rnwzf/20150107_challenge_1
96_intermediate_rail_fence/

 

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

 

is a pretty elegant 

  

 

   ;@:(</.~ 0 1 2 1 $~ #) 'These words will be SCRAMBLED' Terw SMDhs od ilb
CABEewsleRL 

 

 

decode code is ommitted but can be found at link

   dec ;@:(</.~ 0 1 2 1 $~ #) 'These words will be SCRAMBLED' 

These words will be SCRAMBLED

----------------------------------------------------------------------

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

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

Reply via email to