1. Help with Conversion Function (Using Recursion)

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

new topic     » topic index » view message » categorize

2. Re: Help with Conversion Function (Using Recursion)

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...>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Help with Conversion Function (Using Recursion)

----- 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! :)

new topic     » goto parent     » topic index » view message » categorize

4. Re: Help with Conversion Function (Using Recursion)

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! :)
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu