How to create variable using keywords?

4 messages Options
Embed this post
Permalink
patha kumar

How to create variable using keywords?

Reply Threaded More More options
Print post
Permalink
Hi,

I want to creat a variable of type integer and I want to use keywords as variable name.

How to do this?

Ex: Regular basis we'll create following way

i: INTEGER
i:=1
 
keyword like 'do' ----> do: INTEGER
do:=1

Please reply me

Thank you,
Santosh



      Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew
Jann Röder

Re: How to create variable using keywords?

Reply Threaded More More options
Print post
Permalink
I don't think this is possible, and even if it was, why would you want this?

Jann

patha kumar schrieb:

> Hi,
>
> I want to creat a variable of type integer and I want to use keywords as variable name.
>
> How to do this?
>
> Ex: Regular basis we'll create following way
>
> i: INTEGER
> i:=1
>  
> keyword like 'do' ----> do: INTEGER
> do:=1
>
> Please reply me
>
> Thank you,
> Santosh
>
>
>
>       Yahoo! India has a new look. Take a sneak peek http://in.yahoo.com/trynew
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
patha kumar

Re: How to create variable using keywords?

Reply Threaded More More options
Print post
Permalink
Hi Jann,

I am exploring can we do or not?

If yest please send how to declare.

Thank you,
Santosh

--- On Fri, 18/9/09, Jann Röder <[hidden email]> wrote:

From: Jann Röder <[hidden email]>
Subject: Re: [eiffel_software] How to create variable using keywords?
To: [hidden email]
Date: Friday, 18 September, 2009, 9:25 PM






 




   
                  I don't think this is possible, and even if it was, why would you want this?



Jann



patha kumar schrieb:

> Hi,

>

> I want to creat a variable of type integer and I want to use keywords as variable name.

>

> How to do this?

>

> Ex: Regular basis we'll create following way

>

> i: INTEGER

> i:=1

>  

> keyword like 'do' ----> do: INTEGER

> do:=1

>

> Please reply me

>

> Thank you,

> Santosh

>

>

>

>       Yahoo! India has a new look. Take a sneak peek http://in.yahoo. com/trynew

>

>

> ------------ --------- --------- ------

>

> Yahoo! Groups Links

>

>

>


 

     

   
   
       
         
       
       








       


       
       


      Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew

[Non-text portions of this message have been removed]

Ian Joyner-2

Re: How to create variable using keywords?

Reply Threaded More More options
Print post
Permalink
There was a thread on this a few months ago: "Using keywords as  
identifiers". Various mechanisms were explored, but I think the  
conclusion was you can't do it. But by definition a keyword is a  
reserved word in the language. Seems if you start using keywords like  
this you will soon end up with a different language or at least  
something very confusing. You can use a thesaurus to choose an  
alternative. Or maybe even use something like करना for do.

However, maybe you should tell the group what you are really trying to  
achieve, because using a keyword as a variable name does not actually  
do anything.

Ian

On 19 Sep 2009, at 14:05, patha kumar wrote:

> Hi Jann,
>
> I am exploring can we do or not?
>
> If yest please send how to declare.
>
> Thank you,
> Santosh
>
> --- On Fri, 18/9/09, Jann Röder <[hidden email]> wrote:
>
> From: Jann Röder <[hidden email]>
> Subject: Re: [eiffel_software] How to create variable using keywords?
> To: [hidden email]
> Date: Friday, 18 September, 2009, 9:25 PM
>
>
>
> I don't think this is possible, and even if it was, why would you  
> want this?
>
> Jann
>
> patha kumar schrieb:
>
> > Hi,
>
> >
>
> > I want to creat a variable of type integer and I want to use  
> keywords as variable name.
>
> >
>
> > How to do this?
>
> >
>
> > Ex: Regular basis we'll create following way
>
> >
>
> > i: INTEGER
>
> > i:=1
>
> >
>
> > keyword like 'do' ----> do: INTEGER
>
> > do:=1
>
> >
>
> > Please reply me
>
> >
>
> > Thank you,
>
> > Santosh
>
> >
>
> >
>
> >
>
> > Yahoo! India has a new look. Take a sneak peek http://in.yahoo.  
> com/trynew
>
> >
>
> >
>
> > ------------ --------- --------- ------
>
> >
>
> > Yahoo! Groups Links
>
> >
>
> >
>
> >
>
>
>
>
>
>
>
>
>
>
>
> Try the new Yahoo! India Homepage. Click here. http://in.yahoo.com/trynew
>
> [Non-text portions of this message have been removed]
>
>