|
Interactive PikeYou can use Pike interactively, which means that you type a line at a time, letting Pike execute it immediately. Just start Pike by giving the command pike, without any arguments. Then type a statement, for example:
Pike will then do what you told it to do, i. e. print "hello!" on a line:
Similar to main, the built-in function write returns a value, which happens to be the number of characters it has written. Interactive Pike will also show you this return value:
(Seven characters: h, e, l, l, o, the exclamation mark, and the newline character.) Running Pike interactively like this can be very useful when testing things, for example when you are following this tutorial. It can also be used as a very advanced calculator. But beware! Some things don't work the same way in interactive mode as they do when you run a Pike program from a file! For example, type checking is turned off. |
||||||