Support for 2!:4 was removed in J5.01:

J 5.01 Non-Compatible Changes
2!:4 (command line boxes) no longer works.
--
David Mitchell

On 2/15/2010 5:51, Björn Helgason wrote:
> In the help I can not see any 2!:4
>
>
> 2010/2/15 Elmer Fittery<[email protected]>:
>> the external command:
>>
>> 2!:4 fails in the following code.  Has 2!:4 been depricated?
>> Is there a different foreign I could/should use?
>>
>> Any suggestions on how to get it to work?
>>
>> thanks
>>
>> #!/usr/local/bin/jconsole
>>
>> safe_getenv =. monad define
>>         if. 0 -: value =. getenv y do.
>>                 'undefined'
>>         else.
>>                 value
>>         end.
>> )
>>
>> show_info =. monad define
>>         for_arg.
>>            2!:4''
>>         do.
>>                 stdout 'ARGV: ', (>arg), LF
>>         end.
>>
>>         for_envvar. ;:'REQUEST_METHOD PATH_INFO QUERY_STRING' do.
>>                 val =. safe_getenv>envvar
>>                 stdout (>envvar), ': ', val, LF
>>         end.
>>
>>         if. (<safe_getenv 'REQUEST_METHOD') e. ;:'POST PUT'  do.
>>                 input =. stdin''
>>                 stdout 'Number of characters on stdin: ', (": #input),
>> LF
>>                 stdout 'stdin data:',LF,input,LF
>>         end.
>> )
>>
>> echo +/*:0".>,.2}.ARGV
>> first =: _ ".>  {: ARGV
>> last  =: _ ".>  {: ARGV
>>
>> stdout 'Content-Type: text/plain',LF,LF
>> show_info''
>> exit 0
>>
>>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to