Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
Integer arithmetic in tcsh can be done in expressions taken by "while", "if", "exit" or the assignment command "@". Floating point arithmetic is not built in.
Example (size of integer):
#!/bin/tcsh set i=0 j=1 while ($j) @ i++ j*=2 end echo $i
Pay attention to the peculiar order of evaluation! If you type
> @ x = 1 - 1 + 1 > @ y = 2 * 1 / 2 > echo $x $y -1 0
you probably mean:
> @ x = (1 - 1) + 1 > @ y = (2 * 1) / 2 > echo $x $y 1 1