. Now I really understand why the float comparison sometimes fails.
I typed a test code, like this :
float fvalue = 23,\
printf(\"Current value : %f\nPlease enter a value (float) : \", fvalue),\
scanf(\"%f\",&fvalue), 45 ,\
printf(\"The value : %f\n\",fvalue)");
And tested it with 678.54
Finally the program gives 678.539978
, the value certainly is not equivalent to initial value 678.54
(678.539978 == 678.54
always returns false)
Even I set a double
value instead of float
but also it doesn't work...
|hey will i be able to understand this child language? can i test it? |
Sure you can. Be patient.... :)
|L B wrote:|
|Declare in header.hpp|
Define in source.cpp
Oh, that's great! I googled it and finally I've solved the crazy problem. Oh that makes me very overjoyed!!!
Now my project looks like :
Oh, do you know? Over 90 % of functions total I used inline!!!!
|Useless, does it change anything from debug to release compilation? I guess not, except for an eventual 'debug' keyword on the title's name.|
Before that I said the current project I am working on is a general version. So it's completely unrelated to compilation
. What do you mean by "general"
Woohoo!!!! Hooray!!! It's almost done!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Did you take a look at the first example?
Wow, I've just successfully called the function scanf
. What's new? I picked "scanf
" because it requires reference access
. To call this kind of function properly, you have to cast all objects to pointers. Then, here's the syntax :
Symbol : & - Before any variable
r-value : illegal - will be ignored
int value, scanf("%d",&value), printf("Value : %d\n",value)
How to push values?
, At beginning, I ever typed some crazy code like this :
OMG that...that's very horrible!!!!
long long int *lplong;
long long int lValue;
enum variable_type type;
unsigned int reference_level;
unsigned int pointer_level;
. That's about sixteen cases total!!!
Oh, looks like *void
now is really useful. That's another help, hamsterman
|...yes, any address can be assigned to a void*.|
Basically each pointer value always holds 4 bytes stack (My OS certainly is 32-bit) :)
Simply with any pointer, I'll only need to :
__asm push lppointer;
With the powerful definition *void
, I can cast any regular value with :
lpvoid = &a; //Ok
lpvoid = &b; //Ok
lpvoid = &c; //Ok
lpvoid = &d; //Ok
And push them without causing any problem. :)
Done, level 1. Now I'm going to build up auto type variable now...
Ha Ha Ha Ha...