FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Software Bugs
(Moderator: fry)
   Compiler error, please submit code to /// bugs.
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: Compiler error, please submit code to /// bugs.  (Read 279 times)
jmbara


Compiler error, please submit code to /// bugs.
« on: Nov 23rd, 2003, 9:10am »

the subject message happened after I ran the folowing statement:
n = char("Z");
the statement is illegal; I meant the function to be chr which exists in other languages (but not in Processing).
i do  not know whether it is useful to report such compiler errors but am glad to do so if it is.
 
am taking this opportunity to mention that Processing is a fantastic contribution and the IDE is a great pleasure to work with. Great job!
jm
 
arielm

WWW
Re: Compiler error, please submit code to /// bugs
« Reply #1 on: Nov 23rd, 2003, 11:26am »

in java, reference to "char"s is made through apostrophes (quotation marks are for strings only...)
 
so, for instance, something like:
 
char n = 'Z'
 
will do the job, as well as:
 
char n = 90
 

Ariel Malka | www.chronotext.org
jmbara


Re: Compiler error, please submit code to /// bugs
« Reply #2 on: Nov 23rd, 2003, 4:44pm »

many thanks Ariel. so what i really wanted can be written as
int i = 'Z';
which assigns the integer 90 to i.
 
question regarding reporting compiler errors. should they be reported on this list even when the syntax of the source which created the compiler error is clearly wrong?
 
jm
 
fry


WWW
Re: Compiler error, please submit code to /// bugs
« Reply #3 on: Nov 23rd, 2003, 9:40pm »

also note that
int i = 'Z';  
will return the *unicode* value, so if it's a non-ascii character (i.e. something with an umlaut), it's gonna give you a big number. for for something like Z, it's gonna behave as expected.
 
as for reporting the bug, when the compiler dies and asks to submit the code to bugs, then it's helpful for you to post it, since then we know if there are compiler bugs (in this case, the compiler crashed rather than giving you a proper error), and we can test newer versions of the compiler to test if they've fixed the bug.
 
jmbara


Re: Compiler error, please submit code to /// bugs
« Reply #4 on: Nov 23rd, 2003, 10:27pm »

got it. many thanks for the helpful answers!
 
Pages: 1 

« Previous topic | Next topic »