Comments

Phix supports both line and nested block comments.

Line comments are started by two dashes and extend to the end of the current line, e.g.
-- this is a comment
Comments are ignored by the compiler and have no effect on execution speed. By default Edita displays comments in navy.

On the first line (only) of your program, you can use a special comment beginning with #!, e.g.

#!/home/pete/phix/phix
This is reserved for Linux, to inform the shell that your file should be executed by the phix interpreter, and gives the full path to the interpreter. If you make your file executable, you can run it just by typing its name, without the need to type "phix". On Windows this line is treated as a comment.

Block comments are started with /* or --/* and end with */ or --*/ and can be nested to any depth, e.g.
/*
   This is a comment
*/
The --/* and --*/ forms were (and often still are) used for a somewhat dirty little hack.
The following illustrates some differences between handling of block comments by Phix and OpenEuphoiria:
--/* 
include std\console.e           -- Ignored by Phix, included by Eu 
--*/ 
--/* */include builtins\get.e   -- Included by Phix, ignored by Eu 
 
/* 
        puts(1, "Neither Eu nor Phix execute this\n")  
*/ 
 
--/*  
        puts(1, "Eu prints this, Phix does not\n")  
--*/  
 
--/* */ puts(1, "Phix prints this, Eu does not\n")   
 
--/* */ puts(1, "Runs with Phix\n") --/*     
        puts(1, "Runs with Eu\n")   --*/ 
Thanks to ChrisB for suggesting the above. Note that phix source does not need a space in /* */, but this html seems to.

An alternative (more recent and somewhat saner) way to cope with any required differences is:
ifdef PHIX then 
    puts(1,"this is Phix\n") 
elsedef 
    puts(1,"this is Eu\n") 
end ifdef 

See also: Personal Recommendations