|
|
Help:ContentsFrom Nerdhaus
Syntax HighlightingPHP<source lang="php"> <?php // Hello world in PHP echo 'Hello World'; ?> </source> Results in: <?php // Hello world in PHP echo 'Hello World'; ?> C#
<source lang="csharp">
// Hello World in Microsoft C# ("C-Sharp").
using System;
class HelloWorld
{
public static int Main(String[] args)
{
Console.WriteLine("Hello, World!");
return 0;
}
}
</source>
Results in: // Hello World in Microsoft C# ("C-Sharp"). using System; class HelloWorld { public static int Main(String[] args) { Console.WriteLine("Hello, World!"); return 0; } }
Python
<source lang="python">
# Hello World in Python
def main():
print "Hello World!"
if __name__ == '__main__':
main()
</source>
Results in: # Hello World in Python def main(): print "Hello World!" if __name__ == '__main__': main()
Supported languagesThese are the languages known by GeSHi that can be used in the lang parameter:
|