Monday, February 4, 2008

Play with C

I have been a Bash shell scripter for a few months, now I can write a middle size scripts for my lovely ROKR E2. But then I realized that I need to learn more, especially to make a faster native program, then I will need C, C++ or Python. Python is a nice language, but I read that Python run slower than C. Then after read a thread in www.motorolafans.com about ZGCC (GCC for Zaurus) that works in EZX, I tried to run it and voila, it works! I need this because I don't have a Linux PC and far away from PC, so coding directly in my mobile is the best solution for me.

However, it can't work 100%, the "make" and the "moc" is some that can't work, exactly it doesn't compatible very well. It also not compatible with some headers, especially the C++ one. But I think it can compile C very well. That is the reason I take a serious learn for C. Another reason is that C sounds easier for me, since I'm Bash shell scripter before, I'm enjoying C better than C++. :)

After a few days deal with C (I started at 31 January 2008), I write the modified of sensor (see another post) by Rider_ALT. I interest with this because this is a wonderful program but very small program too. It helps me a lot for learn C better.

In the beginning, I always forget to include semi-colon (;) in the end of statement. :( It happens because my style of scripting that never include semi-colon (because it doesn't effect much in Bash), but it really needed in C. That makes me confuse every time the compiler tell me an error...lol

I also can't understand much about arrays and pointers, this both is a new thing for me and really confusing. Well...well... It just a few days of learn... I need a couple of months to understand Bash shell better. So it just beginning for a noob like me. :) However, my plan about KG Toolbox (read another post) will need this.

3 comments:

Anonymous said...

Great job! Do continue to create good applications for us... (:

Jeffri H. said...

Sure, i will try my best...

Anonymous said...

Hello there!
your progress made me jelous!
I wanna code C on my A1200!
can you please share your zgcc package/binary please? (E2 and A1200 are quite similar, indeed...)

Great blog, btw!