Unusual syntax

J

Joona I Palaste

Andre Arpin said:
I found this code in an example anyone knows what (_iHpoints f 3) does.

if (x < (_iHpoints f 3))
_iTextDirection = LEFT;
else if (x > ((2 * _iHpoints) f 3))
_iTextDirection = RIGHT;
else
_iTextDirection = CENTER;

This isn't legal Java syntax at all. Seeing as they also use some sort
of "f=" operator, this leads me to believe that the "f" shown here is
instead supposed to be "&", "|" or "^". But I don't know which one of
them it is.
 
C

Chris Smith

Andre said:
I found this code in an example anyone knows what (_iHpoints f 3) does.


if (x < (_iHpoints f 3))
_iTextDirection = LEFT;
else if (x > ((2 * _iHpoints) f 3))
_iTextDirection = RIGHT;
else
_iTextDirection = CENTER;

What it does is cause a compile error. I can't begin to imagine what it
was intended to do.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
W

Wolf Martinus

Joona said:
Andre Arpin said:
I found this code in an example anyone knows what (_iHpoints f 3) does. [...]
the complete source is at
http://www.javaworld.com/javaworld/jw-06-1998/beans/ColorFadeBar.html


This isn't legal Java syntax at all. Seeing as they also use some sort
of "f=" operator, this leads me to believe that the "f" shown here is
instead supposed to be "&", "|" or "^". But I don't know which one of
them it is.

it's "/" which I believe got mangled converting it to html.

Wolf
 
R

Roedy Green

if (x < (_iHpoints f 3))

I don't think those are f's but some strange character. In the
process of copying the file to the net and encoding differences etc,
whatever operator they were e.g. + got translated to that strange
character.
 
A

Andre Arpin

Wolf Martinus said:
Joona said:
Andre Arpin said:
I found this code in an example anyone knows what (_iHpoints f 3) does. [...]
the complete source is at
http://www.javaworld.com/javaworld/jw-06-1998/beans/ColorFadeBar.html


This isn't legal Java syntax at all. Seeing as they also use some sort
of "f=" operator, this leads me to believe that the "f" shown here is
instead supposed to be "&", "|" or "^". But I don't know which one of
them it is.

it's "/" which I believe got mangled converting it to html.
This is the right answer thank you

Andre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top