Google
 
Android, where is the device?
Posted by pohdes @ Fri 21 Mar, 08, 05:34PM under Programming

Has been looking at Android for quite sometime. Learn up some java, the package available for Android and their usage, but without a project, really no mood to write anything for Android. Plus, no device come with Android yet. Sigh......feel so bored.

Really hope to be able to see something in the market with Android installed, by then I should have some ideas of what programs can I write for my own phone. :) 

2 comment(s) | 405 view(s) | Static Link | Rated:
I like Tcl global variable :)
Posted by pohdes @ Fri 15 Feb, 08, 11:15AM under Programming

For so many programming languages I learned, Tcl has the best global variable usage. It is really good where you can't just use any global variable just like that. Example, in PERL:

#!/usr/bin/perl

our $file = "abc.txt";

With the declaration above, you can use $file in any subroutine.

For Tcl, this is not the case. If you need the variable to be global, you'll need to define it as global:

global file

set file "abc.txt"

Then, when you need to use it in subroutine, you need to do this:

proc sub_routine {} {

global file

puts $file

}

Without the declaration of "global file" in the subroutine, the variable "file" will be undefined.

This is cool......There is no way of misbehave for the global variable. :P 

2 comment(s) | 387 view(s) | Static Link | Rated:
Tcl...Tcl...Tickle...
Posted by pohdes @ Tue 12 Feb, 08, 10:36PM under Programming

My current work is really challenging, having knowledge of C, C++, SKILL, PERL and csh seems to be not enough to do the work, recently has been starting to work with tcl which is yet another programming language. It is pretty hard to learn as tcl is quite different compare with the programming language i knew.

tcl can be consider as a mix of C and csh. It's language a bit like csh and a bit like C, but it doesn't behave like either of them and it is definitely not C or csh. (this sentence sounds like...... :P)

The most significant difference is the sequence of the tcl interpreter. Not like C, C++, PERL, SKILL and csh interpreter/compiler which has the sequence of:

1. Remove all comment

2. Remove all unnecessary white spaces

3. group command

4. interpret/compile

tcl has the sequence of:

1. group command

2. remove all comment

3. remove all unnecessary white spaces

4. interpret

This means that you can write code like this:

set flag 0

if { $flag == 0 } {

    puts "Flag is $flag"

# This is a comment } else {

    puts "Flag is not zero

} 

The code above will still work. :)  So, there are extra care for tcl if you are used to C, C++, PERL, csh and other C-like programming languages. 

After 2 weeks of tickling (:P), I finally get used to the natural behaviour of tcl. I have to admit that tcl is way more flexible and powerful compare to PERL (Some of you might not agree) as it enable the interfacing to C language easily and it has been widely use among all the EDA tools company.

Anyway, I'm still a noob in tcl, there are more for me to catch up on the language. Wish me luck. :)

5 comment(s) | 406 view(s) | Static Link | Rated:
Search

Back to TextMalaysia Home
TextMalaysia.com is Powered by TinyMCE

Subscribe to this blog
RSS Feed for popo.textmalaysia.com
Archive

Latest Posts
Latest Comment
  • Pif... women: i hv to show this to my woman in 将心比心
  • lionel319: hahahahahahahah niama in 将心比心
  • Geena28hb: I opine that this does not matter if choose custom dissertation services or buy thesis services! Because only the quality of the history dissertation referring to this post is counting. in Hyperfocal Distance
My Old Blog...
  • pohdes
  • © TextMalaysia is a free blogging service powered by WSATP