i think it is ok now 
Not yet. It is getting worse actually.

Where does the number "3" come from? The input string can be any length.
As this is a good exercise function I give you a hint:
Only the first char can be "$". Test it outside the loop. Then test the rest of the string in a loop.
You could also support the other notations "0x123ABC" and "123ABCH" as an exercise. Depends on your program if you really need them.
Another hint for performance: Copy() function is expensive as it requires a memory allocation. You can test a single char without copying like "if s[1] = '$' then...
Juha