1. Help with Conversion Function (Using Recursion)
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 29, 2002
- 437 views
Help! I'm trying to make a DIK2ASCII function so I can display keystrokes entered by the user when the program uses ExoticaX. (Why there isn't a function like this already is puzzling...) Anyway, here's the code. I need help with the function, although I really don't expect to feed anything too complicated into it... mainly atoms and strings. Thanks!!! P.S. I've not included the constants data because there's so much of it... the general need is to look for a matching atom in element one of the sequence and return element three of that sequence. I'm thinking it needs to be recursive in case of imbedded sequences...? --------------------------------------- --------------------CODE STARTS HERE--- --------------------------------------- global constant DIK_MODS = { { {} , {} , {} }, { {} , {} , {} } }, DIK_ASCII = { { { {} , {} , {} }, { {} , {} , {} } } global function DIK2ASCII(object x) object retSet if atom(x) then for t=1 to length(DIK_ASCII) do if DIK_ASCII[t][1] = x then retSet = DIK_ASCII[t][3] exit end if next else -- I DON'T KNOW! :) end if return retSet end function
2. Re: Help with Conversion Function (Using Recursion)
- Posted by pampeano at rocketmail.com Jan 30, 2002
- 435 views
elsif sequence(x) callthesamefunction(x) end if =) --- "C. K. Lester" <cklester at yahoo.com> wrote: > > Help! I'm trying to make a DIK2ASCII function so I can display > keystrokes > entered by the user when the program uses ExoticaX. (Why there isn't > a > function like this already is puzzling...>
3. Re: Help with Conversion Function (Using Recursion)
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 30, 2002
- 414 views
----- Original Message ----- From: <pampeano at rocketmail.com> To: "EUforum" <EUforum at topica.com> Subject: Re: Help with Conversion Function (Using Recursion) > > elsif sequence(x) > callthesamefunction(x) > end if > > =) You know what? That's what I had initially, but my brain was malfunctioning (it was late) and I couldn't perceive that would actually be the solution. Nor did I think to actually TEST it... :) Thanks, pampeano! :)
4. Re: Help with Conversion Function (Using Recursion)
- Posted by "C. K. Lester" <cklester at yahoo.com> Jan 30, 2002
- 413 views
Even as I consider it now, it doesn't seem like it would work. Don't I have to append or & some stuff together if it's a sequence? Anyway, I'm not at home where I have all my code, so it'll have to wait. > > elsif sequence(x) > > callthesamefunction(x) > > end if > > > > =) > > You know what? That's what I had initially, but my brain was malfunctioning > (it was late) and I couldn't perceive that would actually be the solution. > Nor did I think to actually TEST it... :) > > Thanks, pampeano! :) > > >