Hilfe:Quelltext: Unterschied zwischen den Versionen
Aus Das Sopra Wiki
Justus (Diskussion | Beiträge) Keine Bearbeitungszusammenfassung |
Justus (Diskussion | Beiträge) K Änderung 222 von Justus (Diskussion) wurde rückgängig gemacht. |
||
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
== | Mit | ||
<pre class="html"> <source lang="sprache"> code </source> </pre> | |||
kann Quelltext mit Syntaxhighlighting in Texte einfefügt werden. Seiten, die dieses Tag enthalten werden automatisch in die Kategorie [[:Kategorie:Code-Beispiele | Code-Beispiele]] aufgenommen. | |||
== Beispiel == | == Beispiel == | ||
<pre> | <pre> | ||
< | <source lang="csharp"> | ||
string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;"; | string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;"; | ||
// single line comments | // single line comments | ||
Zeile 53: | Zeile 18: | ||
// base.OnLoad(e); | // base.OnLoad(e); | ||
} | } | ||
</ | </source> | ||
</pre> | </pre> | ||
wird zu: | wird zu: | ||
< | <source lang="csharp"> | ||
string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;"; | string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;"; | ||
// single line comments | // single line comments | ||
Zeile 70: | Zeile 35: | ||
// base.OnLoad(e); | // base.OnLoad(e); | ||
} | } | ||
</ | </source> | ||
== Verfügbare Sprachen == | |||
[[ | {| class="wikitable" style="float:left" | ||
!Code||Language | |||
|- | |||
|<code>abap</code>||[[wikipedia:ABAP|ABAP]] | |||
|- | |||
|<code>actionscript</code>||[[wikipedia:ActionScript|ActionScript]] | |||
|- | |||
|<code>ada</code>||[[wikipedia:Ada (programming language)|Ada]] | |||
|- | |||
|<code>apache</code>||[[wikipedia:Apache HTTP Server|Apache Log]] | |||
|- | |||
|<code>applescript</code>||[[wikipedia:AppleScript|AppleScript]] | |||
|- | |||
|<code>asm</code>||[[wikipedia:Assembly language|ASM]] | |||
|- | |||
|<code>asp</code>||[[wikipedia:Active Server Pages|Active Server Pages (ASP)]] | |||
|- | |||
|<code>autoit</code>||[[wikipedia:AutoIt|AutoIt]] | |||
|- | |||
|<code>bash</code>||[[wikipedia:Bash|Bash]] | |||
|- | |||
|<code>basic4gl</code>||[[wikipedia:Basic4GL|Basic4GL]] | |||
|- | |||
|<code>bf</code>||[[wikipedia:Brainfuck|Brainfuck]] | |||
|- | |||
|<code>blitzbasic</code>||[[wikipedia:Blitz BASIC|Blitz BASIC]] | |||
|- | |||
|<code>bnf</code>||[[wikipedia:Backus-Naur Form|Backus-Naur Form]] | |||
|- | |||
|<code>c</code>||[[wikipedia:C (programming language)|C]] | |||
|- | |||
|<code>c_mac</code>||C (Mac) | |||
|- | |||
|<code>caddcl</code>||[[wikipedia:Dialog Control Language|AutoCAD DCL]] | |||
|- | |||
|<code>cadlisp</code>||[[wikipedia:AutoLISP|AutoLISP]] | |||
|- | |||
|<code>cfdg</code>||CFDG | |||
|- | |||
|<code>cfm</code>||[[wikipedia:ColdFusion|ColdFusion]] | |||
|- | |||
|<code>cil</code>||[[wikipedia:Common_Intermediate_Language|Common Intermediate Language (CIL)]] | |||
|- | |||
|<code>cobol</code>||[[wikipedia:COBOL|COBOL]] | |||
|- | |||
|<code>cpp-qt</code>||[[wikipedia:Qt (toolkit)|C++ (Qt toolkit)]] | |||
|- | |||
|<code>cpp</code>||[[wikipedia:C++|C++]] | |||
|- | |||
|<code>csharp</code>||[[wikipedia:C Sharp (programming language)|C#]] | |||
|- | |||
|<code>css</code>||[[wikipedia:Cascading Style Sheets|Cascading Style Sheets (CSS)]] | |||
|- | |||
|<code>d</code>||[[wikipedia:D (programming language)|D]] | |||
|- | |||
|<code>delphi</code>||[[wikipedia:Delphi programming language|Delphi]] | |||
|- | |||
|<code>diff</code>||[[wikipedia:diff|Diff]] | |||
|- | |||
|<code>div</code>||DIV | |||
|- | |||
|<code>dos</code>||[[wikipedia:DOS batch file|DOS batch file]] | |||
|- | |||
|<code>dot</code>||[[wikipedia:DOT language|DOT]] | |||
|- | |||
|<code>eiffel</code>||[[wikipedia:Eiffel (programming language)|Eiffel]] | |||
|- | |||
|<code>fortran</code>||[[wikipedia:Fortran|Fortran]] | |||
|- | |||
|<code>freebasic</code>||[[wikipedia:FreeBASIC|FreeBASIC]] | |||
|- | |||
|<code>genero</code>||Genero | |||
|- | |||
|<code>gettext</code>||[[wikipedia:GNU_gettext|GNU internationalization (i18n) library]] | |||
|- | |||
|<code>glsl</code>||[[wikipedia:GLSL|OpenGL Shading Language (GLSL)]] | |||
|- | |||
|<code>gml</code>||[[wikipedia:Game Maker Language|Game Maker Language (GML)]] | |||
|- | |||
|<code>gnuplot</code>||[[wikipedia:Gnuplot|gnuplot]] | |||
|- | |||
|<code>groovy</code>||[[wikipedia:Groovy (programming language)|Groovy]] | |||
|- | |||
|<code>haskell</code>||[[wikipedia:Haskell (programming language)|Haskell]] | |||
|- | |||
|<code>hq9plus</code>||HQ9+ | |||
|- | |||
|<code>html4strict</code>||[[wikipedia:HTML|HTML]] | |||
|- | |||
|<code>idl</code>||[[wikipedia:Universal Network Objects|Uno IDL]] | |||
|- | |||
|<code>ini</code>||[[wikipedia:INI file|INI]] | |||
|- | |||
|<code>inno</code>||[[wikipedia:Inno Setup|Inno]] | |||
|- | |||
|<code>intercal</code>||[[wikipedia:INTERCAL|INTERCAL]] | |||
|- | |||
|<code>io</code>||[[wikipedia:Io (programming language)|Io]] | |||
|- | |||
|<code>java</code>||[[wikipedia:Java (programming language)|Java]] | |||
|- | |||
|<code>java5</code>||[[wikipedia:Java (programming language)|Java(TM) 2 Platform Standard Edition 5.0 ]] | |||
|- | |||
|<code>javascript</code>||[[wikipedia:JavaScript|JavaScript]] | |||
|- | |||
|<code>kixtart</code>||[[wikipedia:KiXtart|KiXtart]] | |||
|- | |||
|<code>klonec</code>||Klone C | |||
|- | |||
|<code>klonecpp</code>||Klone C++ | |||
|- | |||
|<code>latex</code>||[[wikipedia:LaTeX|LaTeX]] | |||
|- | |||
|<code>lisp</code>||[[wikipedia:Lisp (programming language)|Lisp]] | |||
|- | |||
|<code>lolcode</code>||[[wikipedia:LOLCODE|LOLCODE]] | |||
|- | |||
|<code>lotusscript</code>||[[wikipedia:LotusScript|LotusScript]] | |||
|- | |||
|<code>lua</code>||[[wikipedia:Lua (programming language)|Lua]] | |||
|} | |||
{| class="wikitable" style="float:left" | |||
!Code||Language | |||
|- | |||
|<code>m68k</code>||[[wikipedia:Motorola 68000|Motorola 68000 Assembler]] | |||
|- | |||
|<code>make</code>||[[wikipedia:Make_(software)|make]] | |||
|- | |||
|<code>matlab</code>||[[wikipedia:MATLAB|MATLAB M]] | |||
|- | |||
|<code>mirc</code>||[[wikipedia:mIRC scripting language|mIRC scripting language]] | |||
|- | |||
|<code>mxml</code>||[[wikipedia:MXML|MXML]] | |||
|- | |||
|<code>mpasm</code>||[[wikipedia:PIC microcontroller|Microchip Assembler]] | |||
|- | |||
|<code>mysql</code>||[[wikipedia:MySQL|MySQL]] | |||
|- | |||
|<code>nsis</code>||[[wikipedia:Nullsoft Scriptable Install System|Nullsoft Scriptable Install System (NSIS)]] | |||
|- | |||
|<code>objc</code>||[[wikipedia:Objective-C|Objective-C]] | |||
|- | |||
|<code>ocaml-brief</code>||[[wikipedia:Objective Caml|OCaml]] | |||
|- | |||
|<code>ocaml</code>||[[wikipedia:Objective Caml|OCaml]] | |||
|- | |||
|<code>oobas</code>||[[wikipedia:StarOffice Basic|OpenOffice.org Basic]] | |||
|- | |||
|<code>oracle8</code>||[[wikipedia:PL/SQL|Oracle 8 SQL]] | |||
|- | |||
|<code>oracle11</code>||[[wikipedia:PL/SQL|Oracle 11 SQL]] | |||
|- | |||
|<code>pascal</code>||[[wikipedia:Pascal (programming language)|Pascal]] | |||
|- | |||
|<code>per</code>||per | |||
|- | |||
|<code>perl</code>||[[wikipedia:Perl|Perl]] | |||
|- | |||
|<code>php-brief</code>||[[wikipedia:PHP|PHP]] | |||
|- | |||
|<code>php</code>||[[wikipedia:PHP|PHP]] | |||
|- | |||
|<code>pixelbender</code>||[[wikipedia:Adobe_Pixel_Bender|Pixel Bender]] | |||
|- | |||
|<code>plsql</code>||[[wikipedia:PL/SQL|PL/SQL]] | |||
|- | |||
|<code>povray</code>||[[wikipedia:POV-Ray|Persistence of Vision Raytracer]] | |||
|- | |||
|<code>powershell</code>||[[wikipedia:Windows_PowerShell|Windows PowerShell]] | |||
|- | |||
|<code>progress</code>||[[wikipedia:OpenEdge_Advanced_Business_Language|OpenEdge Advanced Business Language]] | |||
|- | |||
|<code>prolog</code>||[[wikipedia:Prolog|Prolog]] | |||
|- | |||
|<code>providex</code>||[[wikipedia:ProvideX|ProvideX]] | |||
|- | |||
|<code>python</code>||[[wikipedia:Python (programming language)|Python]] | |||
|- | |||
|<code>qbasic</code>||[[wikipedia:QBasic|QBasic/QuickBASIC]] | |||
|- | |||
|<code>rails</code>||[[wikipedia:Ruby on Rails|Rails]] | |||
|- | |||
|<code>reg</code>||[[wikipedia:Windows Registry|Windows Registry]] | |||
|- | |||
|<code>robots</code>||[[wikipedia:Robots Exclusion Standard|robots.txt]] | |||
|- | |||
|<code>ruby</code>||[[wikipedia:Ruby (programming language)|Ruby]] | |||
|- | |||
|<code>sas</code>||[[wikipedia:SAS System|SAS]] | |||
|- | |||
|<code>scala</code>||[[wikipedia:Scala_(programming_language)|Scala]] | |||
|- | |||
|<code>scheme</code>||[[wikipedia:Scheme (programming language)|Scheme]] | |||
|- | |||
|<code>scilab</code>||[[wikipedia:Scilab|Scilab]] | |||
|- | |||
|<code>sdlbasic</code>||[[wikipedia:SdlBasic|SdlBasic]] | |||
|- | |||
|<code>smalltalk</code>||[[wikipedia:Smalltalk|Smalltalk]] | |||
|- | |||
|<code>smarty</code>||[[wikipedia:Smarty|Smarty]] | |||
|- | |||
|<code>sql</code>||[[wikipedia:SQL|SQL]] | |||
|- | |||
|<code>tcl</code>||[[wikipedia:Tcl|Tcl]] | |||
|- | |||
|<code>teraterm</code>||[[wikipedia:TeraTerm|Tera Term]] | |||
|- | |||
|<code>text</code>||[[wikipedia:Plain text|Plain text]] | |||
|- | |||
|<code>thinbasic</code>||[[wikipedia:thinBasic|thinBasic]] | |||
|- | |||
|<code>tsql</code>||[[wikipedia:Transact-SQL|Transact-SQL]] | |||
|- | |||
|<code>typoscript</code>||[[wikipedia:TYPO3|TypoScript]] | |||
|- | |||
|<code>vb</code>||[[wikipedia:Visual Basic|Visual Basic]] | |||
|- | |||
|<code>vbnet</code>||[[wikipedia:Visual Basic .NET|Visual Basic .NET]] | |||
|- | |||
|<code>verilog</code>||[[wikipedia:Verilog|Verilog]] | |||
|- | |||
|<code>vhdl</code>||[[wikipedia:VHSIC Hardware Description Language|VHDL]] | |||
|- | |||
|<code>vim</code>||[[wikipedia:Vimscript|Vimscript]] | |||
|- | |||
|<code>visualfoxpro</code>||[[wikipedia:Visual FoxPro|Visual FoxPro]] | |||
|- | |||
|<code>visualprolog</code>||[[wikipedia:Visual_Prolog|Visual Prolog]] | |||
|- | |||
|<code>whitespace</code>||[[wikipedia:Whitespace_(programming_language)|Whitespace]] | |||
|- | |||
|<code>winbatch</code>||[[wikipedia:Winbatch|Winbatch]] | |||
|- | |||
|<code>xml</code>||[[wikipedia:XML|XML]] | |||
|- | |||
|<code>xorg_conf</code>||[[wikipedia:Xorg.conf|Xorg.conf]] | |||
|- | |||
|<code>xpp</code>||[[wikipedia:Microsoft_Dynamics_AX|X++]] | |||
|- | |||
|<code>z80</code>||[[wikipedia:Zilog Z80|ZiLOG Z80 Assembler]] | |||
|}[[Kategorie:Wiki-Hilfe]] [[Kategorie:Code-Beispiele]] |
Aktuelle Version vom 16. April 2009, 20:18 Uhr
Mit
<source lang="sprache"> code </source>
kann Quelltext mit Syntaxhighlighting in Texte einfefügt werden. Seiten, die dieses Tag enthalten werden automatisch in die Kategorie Code-Beispiele aufgenommen.
Beispiel
<source lang="csharp"> string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;"; // single line comments // second single line override protected void OnLoad(EventArgs e) { if(Attributes["class"] != null) { //_year.CssClass = Attributes["class"]; } // base.OnLoad(e); } </source>
wird zu:
string url = "<a href=\"" + someObj.getUrl() + "\" target=\"_blank\">l;";
// single line comments
// second single line
override protected void OnLoad(EventArgs e)
{
if(Attributes["class"] != null)
{
//_year.CssClass = Attributes["class"];
}
// base.OnLoad(e);
}