Thanks very much, both of you.
I can try to avoid using variables, but this may not help in long term since if I keep avoid it, how can I know how to use it?
kaz, your conclusion is very interesting. Since variable can be only used in a process (where it is declared). If this process is a sequential logic (sensitivity list is a clock and trigger by edge) , then signal is used for registers while variables is used for combinatorial logic. But if this is already a combinatorial logic process, then signal and variable will be same. Is that my understanding basically right?
Thanks very much.