Operators
TCL supports following type of operators:
Arithmetic: + - * / : These operators are performed like C
%: This operators is performed like Perl
Compare: > >= < <= == : These operators are performed like C, though can be used on both, numbers as well as contents of string.
Logical: Performed just like in C
Bitwise: ~ & | ^ : These are performed like in C and only on integers.
File: These are like file test operators in Unix.
Syntax: file option arg1 [...]
1. file readable file1
2. file writable file1
3. file executable file1
4. file exists file1
5. file isfile file1
6. file isdirectory file1
7. file attributes file1 ##gives description
8. file owned file1 ##returns true or false
9. file type file1 ##returns whether file or dir or char symbol or block symbol
Arithmetic: + - * / : These operators are performed like C
%: This operators is performed like Perl
Compare: > >= < <= == : These operators are performed like C, though can be used on both, numbers as well as contents of string.
Logical: Performed just like in C
Bitwise: ~ & | ^ : These are performed like in C and only on integers.
File: These are like file test operators in Unix.
Syntax: file option arg1 [...]
1. file readable file1
2. file writable file1
3. file executable file1
4. file exists file1
5. file isfile file1
6. file isdirectory file1
7. file attributes file1 ##gives description
8. file owned file1 ##returns true or false
9. file type file1 ##returns whether file or dir or char symbol or block symbol
« Previous Next »
Comments
Post a Comment