The length error comes from Unicode:

   $ '+'
3

Your string  '+' is actually a shorthand for a 3-character Unicode
sequence, and it gives a length error when compared with the
1-character list in sysdata.

   a. i. '+'
226 148 164

Henry Rich
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Jimmy Miller
> Sent: Sunday, June 03, 2007 10:50 AM
> To: Programming forum
> Subject: Re: [Jprogramming] sysdata in the isigraph char event
> 
> Thanks for the reply.  I got to the point where I could test for
> individual letter keys, but I'm still having trouble with the arrows.
> If I try to test for the characters that correspond to the arrow keys,
> like +:
> 
> test_pic_char =: 3 : 0
> if. sysdata = '+' do.
> wd 'setxywh pic 0 0 150 150'
> end.
> )
> 
> I get a 'length error' when the program runs.  Any ideas?
> 
> On 6/3/07, Chris Burke <[EMAIL PROTECTED]> wrote:
> > Jimmy Miller wrote:
> > > I've been trying to get an isigraph to move to a certain 
> location when
> > > the user presses the up arrow key.  I figured out how to get it to
> > > move based on any key:
> > >
> > > test_pic_char =: 3 : 0
> > > wd 'setxywh pic 0 0 150 150'
> > > )
> > >
> > > But I'm unsure how to detect the up key.  Based on the 
> isigraph events
> > > page (http://www.jsoftware.com/help/user/isigraph_events.htm), I
> > > figured sysdata would be 21 when the user presses the up key:
> >
> > The datatype of sysdata is always character. The numbers 
> shown are the
> > indices of the character values in a. (alphabet).
> >
> > You can just press a key, observe the value of sysdata, and 
> then program
> > for that value.
> > 
> ----------------------------------------------------------------------
> > For information about J forums see 
> http://www.jsoftware.com/forums.htm
> >
> 
> 
> -- 
> <a 
> href="http://www.spreadfirefox.com/?q=affiliates&id=153516&t=1
> "><textarea
> rows="3" cols="40">Get Firefox!</a>
> 

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

Reply via email to