Geshi-Highlight: Porovnání verzí

Z MediaWiki SPŠ a VOŠ Písek
Skočit na navigaci Skočit na vyhledávání
Bez shrnutí editace
Bez shrnutí editace
 
(Není zobrazeno 13 mezilehlých verzí od 2 dalších uživatelů.)
Řádek 1: Řádek 1:
<syntaxhighlight lang="php">  
<nowiki> <source lang="php">
 
<source lang="c">
 
<source lang="asm">
 
<source lang="basic4l">  </nowiki>
 
* Další viz tabulka dole!
 
<source lang="php">  
 
<?php     
<?php     
for ($i=0;$i<=10;$i++) // Příklad cyklu for v php. BY ROMAN SVOBODA
for ($i=0;$i<=10;$i++) // Příklad cyklu for v php. BY ROMAN SVOBODA
Řádek 17: Řádek 28:
}
}
?>  
?>  
</syntaxhighlight>
</source>


<syntaxhighlight lang="C">  
<source lang="C">  
#include <reg51.h>
#include <reg51.h>
#include<stdio.h>
#include<stdio.h>
Řádek 51: Řádek 62:
}
}
</syntaxhighlight>
</source>


<syntaxhighlight lang="asm">  
<source lang="asm">  
$mod51
$mod51


org 00h        ;ukládání programu
org 00h        ;ukládání programu


start: mov A,#01010111b    ; zápis do akumulátoru
start: mov A,#01010111b    ; zápis do akumulátoru
mov P1,A            ; přesun na bránu P1
mov P1,A            ; přesun na bránu P1


mov  A,#10101000b
mov  A,#10101000b
mov P1,A
mov P1,A


sjmp start          ; krátký skok na návěští     
sjmp start          ; krátký skok na návěští     
end  
end  
</syntaxhighlight>
</source>


==Podporované jazyky==
{| class="wikitable" style="float:left"
{| class="wikitable" style="float:left"
!Code||Language
!lang=" "||Odpovídající jazyk
|-
|-
|<code>abap</code>||[[:en:ABAP|ABAP]]
|abap||[[:en:ABAP|ABAP]]
|-
|-
|<code>actionscript</code>||[[:en:ActionScript|ActionScript]]
|actionscript||[[:en:ActionScript|ActionScript]]
|-
|-
|<code>ada</code>||[[:en:Ada (programming language)|Ada]]
|ada||[[:en:Ada (programming language)|Ada]]
|-
|-
|<code>apache</code>||[[:en:Apache HTTP Server|Apache Configuration]]
|apache||[[:en:Apache HTTP Server|Apache Configuration]]
|-
|-
|<code>applescript</code>||[[:en:AppleScript|AppleScript]]
|applescript||[[:en:AppleScript|AppleScript]]
|-
|-
|<code>asm</code>||[[:en:Assembly language|ASM]]
|asm||[[:en:Assembly language|ASM]]
|-
|-
|<code>asp</code>||[[:en:Active Server Pages|Active Server Pages (ASP)]]
|asp||[[:en:Active Server Pages|Active Server Pages (ASP)]]
|-
|-
|<code>autoit</code>||[[:en:AutoIt|AutoIt]]
|autoit||[[:en:AutoIt|AutoIt]]
|-
|-
|<code>bash</code>||[[:en:Bash (Unix shell)|Bash]]
|bash||[[:en:Bash (Unix shell)|Bash]]
|-
|-
|<code>basic4gl</code>||[[:en:Basic4GL|Basic4GL]]
|basic4gl||[[:en:Basic4GL|Basic4GL]]
|-
|-
|<code>bf</code>||[[:en:Brainfuck|Brainfuck]]
|bf||[[:en:Brainfuck|Brainfuck]]
|-
|-
|<code>blitzbasic</code>||[[:en:Blitz BASIC|Blitz BASIC]]
|blitzbasic||[[:en:Blitz BASIC|Blitz BASIC]]
|-
|-
|<code>bnf</code>||[[:en:Backus-Naur Form|Backus-Naur Form]]
|bnf||[[:en:Backus-Naur Form|Backus-Naur Form]]
|-
|-
|<code>c</code>||[[:en:C (programming language)|C]]
|c||[[:en:C (programming language)|C]]
|-
|-
|<code>c_mac</code>||C (Mac)
|c_mac||C (Mac)
|-
|-
|<code>caddcl</code>||[[:en:Dialog Control Language|AutoCAD DCL]]
|caddcl||[[:en:Dialog Control Language|AutoCAD DCL]]
|-
|-
|<code>cadlisp</code>||[[:en:AutoLISP|AutoLISP]]
|cadlisp||[[:en:AutoLISP|AutoLISP]]
|-
|-
|<code>cfdg</code>||CFDG
|cfdg||CFDG
|-
|-
|<code>cfm</code>||[[:en:ColdFusion_Markup_Language|ColdFusion Markup Language]]
|cfm||[[:en:ColdFusion_Markup_Language|ColdFusion Markup Language]]
|-
|-
|<code>cil</code>||[[:en:Common_Intermediate_Language|Common Intermediate Language (CIL)]]
|cil||[[:en:Common_Intermediate_Language|Common Intermediate Language (CIL)]]
|-
|-
|<code>cobol</code>||[[:en:COBOL|COBOL]]
|cobol||[[:en:COBOL|COBOL]]
|-
|-
|<code>cpp-qt</code>||[[:en:Qt (toolkit)|C++ (Qt toolkit)]]
|cpp-qt||[[:en:Qt (toolkit)|C++ (Qt toolkit)]]
|-
|-
|<code>cpp</code>||[[:en:C++|C++]]
|cpp||[[:en:C++|C++]]
|-
|-
|<code>csharp</code>||[[:en:C Sharp (programming language)|C#]]
|csharp||[[:en:C Sharp (programming language)|C#]]
|-
|-
|<code>css</code>||[[:en:Cascading Style Sheets|Cascading Style Sheets (CSS)]]
|css||[[:en:Cascading Style Sheets|Cascading Style Sheets (CSS)]]
|-
|-
|<code>d</code>||[[:en:D (programming language)|D]]
|d||[[:en:D (programming language)|D]]
|-
|-
|<code>delphi</code>||[[:en:Delphi programming language|Delphi]]
|delphi||[[:en:Delphi programming language|Delphi]]
|-
|-
|<code>diff</code>||[[:en:diff|Diff]]
|diff||[[:en:diff|Diff]]
|-
|-
|<code>div</code>||DIV
|div||DIV
|-
|-
|<code>dos</code>||[[:en:DOS batch file|DOS batch file]]
|dos||[[:en:DOS batch file|DOS batch file]]
|-
|-
|<code>dot</code>||[[:en:DOT language|DOT]]
|dot||[[:en:DOT language|DOT]]
|-
|-
|<code>eiffel</code>||[[:en:Eiffel (programming language)|Eiffel]]
|eiffel||[[:en:Eiffel (programming language)|Eiffel]]
|-
|-
|<code>fortran</code>||[[:en:Fortran|Fortran]]
|fortran||[[:en:Fortran|Fortran]]
|-
|-
|<code>freebasic</code>||[[:en:FreeBASIC|FreeBASIC]]
|freebasic||[[:en:FreeBASIC|FreeBASIC]]
|-
|-
|<code>genero</code>||Genero
|genero||Genero
|-
|-
|<code>gettext</code>||[[:en:GNU_gettext|GNU internationalization (i18n) library]]
|gettext||[[:en:GNU_gettext|GNU internationalization (i18n) library]]
|-
|-
|<code>glsl</code>||[[:en:GLSL|OpenGL Shading Language (GLSL)]]
|glsl||[[:en:GLSL|OpenGL Shading Language (GLSL)]]
|-
|-
|<code>gml</code>||[[:en:Game Maker Language|Game Maker Language (GML)]]
|gml||[[:en:Game Maker Language|Game Maker Language (GML)]]
|-
|-
|<code>gnuplot</code>||[[:en:Gnuplot|gnuplot]]
|gnuplot||[[:en:Gnuplot|gnuplot]]
|-
|-
|<code>groovy</code>||[[:en:Groovy (programming language)|Groovy]]
|groovy||[[:en:Groovy (programming language)|Groovy]]
|-
|-
|<code>haskell</code>||[[:en:Haskell (programming language)|Haskell]]
|haskell||[[:en:Haskell (programming language)|Haskell]]
|-
|-
|<code>hq9plus</code>||HQ9+
|hq9plus||HQ9+
|-
|-
|<code>html4strict</code>||[[:en:HTML|HTML]]
|html4strict||[[:en:HTML|HTML]]
|-
|-
|<code>idl</code>||[[:en:Universal Network Objects|Uno IDL]]
|idl||[[:en:Universal Network Objects|Uno IDL]]
|-
|-
|<code>ini</code>||[[:en:INI file|INI]]
|ini||[[:en:INI file|INI]]
|-
|-
|<code>inno</code>||[[:en:Inno Setup|Inno]]
|inno||[[:en:Inno Setup|Inno]]
|-
|-
|<code>intercal</code>||[[:en:INTERCAL|INTERCAL]]
|intercal||[[:en:INTERCAL|INTERCAL]]
|-
|-
|<code>io</code>||[[:en:Io (programming language)|Io]]
|io||[[:en:Io (programming language)|Io]]
|-
|-
|<code>java</code>||[[:en:Java (programming language)|Java]]
|java||[[:en:Java (programming language)|Java]]
|-
|-
|<code>java5</code>||[[:en:Java (programming language)|Java(TM) 2 Platform Standard Edition 5.0 ]]
|java5||[[:en:Java (programming language)|Java(TM) 2 Platform Standard Edition 5.0 ]]
|-
|-
|<code>javascript</code>||[[:en:JavaScript|JavaScript]]
|javascript||[[:en:JavaScript|JavaScript]]
|-
|-
|<code>kixtart</code>||[[:en:KiXtart|KiXtart]]
|kixtart||[[:en:KiXtart|KiXtart]]
|-
|-
|<code>klonec</code>||Klone C
|klonec||Klone C
|-
|-
|<code>klonecpp</code>||Klone C++
|klonecpp||Klone C++
|-
|-
|<code>latex</code>||[[:en:LaTeX|LaTeX]]
|latex||[[:en:LaTeX|LaTeX]]
|-
|-
|<code>lisp</code>||[[:en:Lisp (programming language)|Lisp]]
|lisp||[[:en:Lisp (programming language)|Lisp]]
|-
|-
|<code>lolcode</code>||[[:en:LOLCODE|LOLCODE]]
|lolcode||[[:en:LOLCODE|LOLCODE]]
|-
|-
|<code>lotusscript</code>||[[:en:LotusScript|LotusScript]]
|lotusscript||[[:en:LotusScript|LotusScript]]
|-
|-
|<code>lua</code>||[[:en:Lua (programming language)|Lua]]
|lua||[[:en:Lua (programming language)|Lua]]
|}
|}
{| class="wikitable" style="float:left"
{| class="wikitable" style="float:left"
!Code||Language
!lang=" "||Odpovídající jazyk
|-
|-
|<code>m68k</code>||[[:en:Motorola 68000|Motorola 68000 Assembler]]
|m68k||[[:en:Motorola 68000|Motorola 68000 Assembler]]
|-
|-
|<code>make</code>||[[:en:Make_(software)|make]]
|make||[[:en:Make_(software)|make]]
|-
|-
|<code>matlab</code>||[[:en:MATLAB|MATLAB M]]
|matlab||[[:en:MATLAB|MATLAB M]]
|-
|-
|<code>mirc</code>||[[:en:mIRC scripting language|mIRC scripting language]]
|mirc||[[:en:mIRC scripting language|mIRC scripting language]]
|-
|-
|<code>mxml</code>||[[:en:MXML|MXML]]
|mxml||[[:en:MXML|MXML]]
|-
|-
|<code>mpasm</code>||[[:en:PIC microcontroller|Microchip Assembler]]
|mpasm||[[:en:PIC microcontroller|Microchip Assembler]]
|-
|-
|<code>mysql</code>||[[:en:MySQL|MySQL]]
|mysql||[[:en:MySQL|MySQL]]
|-
|-
|<code>nsis</code>||[[:en:Nullsoft Scriptable Install System|Nullsoft Scriptable Install System (NSIS)]]
|nsis||[[:en:Nullsoft Scriptable Install System|Nullsoft Scriptable Install System (NSIS)]]
|-
|-
|<code>objc</code>||[[:en:Objective-C|Objective-C]]
|objc||[[:en:Objective-C|Objective-C]]
|-
|-
|<code>ocaml-brief</code>||[[:en:Objective Caml|OCaml]]
|ocaml-brief||[[:en:Objective Caml|OCaml]]
|-
|-
|<code>ocaml</code>||[[:en:Objective Caml|OCaml]]
|ocaml||[[:en:Objective Caml|OCaml]]
|-
|-
|<code>oobas</code>||[[:en:StarOffice Basic|OpenOffice.org Basic]]
|oobas||[[:en:StarOffice Basic|OpenOffice.org Basic]]
|-
|-
|<code>oracle8</code>||[[:en:PL/SQL|Oracle 8 SQL]]
|oracle8||[[:en:PL/SQL|Oracle 8 SQL]]
|-
|-
|<code>oracle11</code>||[[:en:PL/SQL|Oracle 11 SQL]]
|oracle11||[[:en:PL/SQL|Oracle 11 SQL]]
|-
|-
|<code>pascal</code>||[[:en:Pascal (programming language)|Pascal]]
|pascal||[[:en:Pascal (programming language)|Pascal]]
|-
|-
|<code>per</code>||per
|per||per
|-
|-
|<code>perl</code>||[[:en:Perl|Perl]]
|perl||[[:en:Perl|Perl]]
|-
|-
|<code>php-brief</code>||[[:en:PHP|PHP]]
|php-brief||[[:en:PHP|PHP]]
|-
|-
|<code>php</code>||[[:en:PHP|PHP]]
|php||[[:en:PHP|PHP]]
|-
|-
|<code>pixelbender</code>||[[:en:Adobe_Pixel_Bender|Pixel Bender]]
|pixelbender||[[:en:Adobe_Pixel_Bender|Pixel Bender]]
|-
|-
|<code>plsql</code>||[[:en:PL/SQL|PL/SQL]]
|plsql||[[:en:PL/SQL|PL/SQL]]
|-
|-
|<code>povray</code>||[[:en:POV-Ray|Persistence of Vision Raytracer]]
|povray||[[:en:POV-Ray|Persistence of Vision Raytracer]]
|-
|-
|<code>powershell</code>||[[:en:Windows_PowerShell|Windows PowerShell]]
|powershell||[[:en:Windows_PowerShell|Windows PowerShell]]
|-
|-
|<code>progress</code>||[[:en:OpenEdge_Advanced_Business_Language|OpenEdge Advanced Business Language]]
|progress||[[:en:OpenEdge_Advanced_Business_Language|OpenEdge Advanced Business Language]]
|-
|-
|<code>prolog</code>||[[:en:Prolog|Prolog]]
|prolog||[[:en:Prolog|Prolog]]
|-
|-
|<code>providex</code>||[[:en:ProvideX|ProvideX]]
|providex||[[:en:ProvideX|ProvideX]]
|-
|-
|<code>python</code>||[[:en:Python (programming language)|Python]]
|python||[[:en:Python (programming language)|Python]]
|-
|-
|<code>qbasic</code>||[[:en:QBasic|QBasic/QuickBASIC]]
|qbasic||[[:en:QBasic|QBasic/QuickBASIC]]
|-
|-
|<code>rails</code>||[[:en:Ruby on Rails|Rails]]
|rails||[[:en:Ruby on Rails|Rails]]
|-
|-
|<code>reg</code>||[[:en:Windows Registry|Windows Registry]]
|reg||[[:en:Windows Registry|Windows Registry]]
|-
|-
|<code>robots</code>||[[:en:Robots Exclusion Standard|robots.txt]]
|robots||[[:en:Robots Exclusion Standard|robots.txt]]
|-
|-
|<code>ruby</code>||[[:en:Ruby (programming language)|Ruby]]
|ruby||[[:en:Ruby (programming language)|Ruby]]
|-
|-
|<code>sas</code>||[[:en:SAS System|SAS]]
|sas||[[:en:SAS System|SAS]]
|-
|-
|<code>scala</code>||[[:en:Scala_(programming_language)|Scala]]
|scala||[[:en:Scala_(programming_language)|Scala]]
|-
|-
|<code>scheme</code>||[[:en:Scheme (programming language)|Scheme]]
|scheme||[[:en:Scheme (programming language)|Scheme]]
|-
|-
|<code>scilab</code>||[[:en:Scilab|Scilab]]
|scilab||[[:en:Scilab|Scilab]]
|-
|-
|<code>sdlbasic</code>||[[:en:SdlBasic|SdlBasic]]
|sdlbasic||[[:en:SdlBasic|SdlBasic]]
|-
|-
|<code>smalltalk</code>||[[:en:Smalltalk|Smalltalk]]
|smalltalk||[[:en:Smalltalk|Smalltalk]]
|-
|-
|<code>smarty</code>||[[:en:Smarty|Smarty]]
|smarty||[[:en:Smarty|Smarty]]
|-
|-
|<code>sql</code>||[[:en:SQL|SQL]]
|sql||[[:en:SQL|SQL]]
|-
|-
|<code>tcl</code>||[[:en:Tcl|Tcl]]
|tcl||[[:en:Tcl|Tcl]]
|-
|-
|<code>teraterm</code>||[[:en:TeraTerm|Tera Term]]
|teraterm||[[:en:TeraTerm|Tera Term]]
|-
|-
|<code>text</code>||[[:en:Plain text|Plain text]]
|text||[[:en:Plain text|Plain text]]
|-
|-
|<code>thinbasic</code>||[[:en:thinBasic|thinBasic]]
|thinbasic||[[:en:thinBasic|thinBasic]]
|-
|-
|<code>tsql</code>||[[:en:Transact-SQL|Transact-SQL]]
|tsql||[[:en:Transact-SQL|Transact-SQL]]
|-
|-
|<code>typoscript</code>||[[:en:TYPO3|TypoScript]]
|typoscript||[[:en:TYPO3|TypoScript]]
|-
|-
|<code>vb</code>||[[:en:Visual Basic|Visual Basic]]
|vb||[[:en:Visual Basic|Visual Basic]]
|-
|-
|<code>vbnet</code>||[[:en:Visual Basic .NET|Visual Basic .NET]]
|vbnet||[[:en:Visual Basic .NET|Visual Basic .NET]]
|-
|-
|<code>verilog</code>||[[:en:Verilog|Verilog]]
|verilog||[[:en:Verilog|Verilog]]
|-
|-
|<code>vhdl</code>||[[:en:VHSIC Hardware Description Language|VHDL]]
|vhdl||[[:en:VHSIC Hardware Description Language|VHDL]]
|-
|-
|<code>vim</code>||[[:en:Vimscript|Vimscript]]
|vim||[[:en:Vimscript|Vimscript]]
|-
|-
|<code>visualfoxpro</code>||[[:en:Visual FoxPro|Visual FoxPro]]
|visualfoxpro||[[:en:Visual FoxPro|Visual FoxPro]]
|-
|-
|<code>visualprolog</code>||[[:en:Visual_Prolog|Visual Prolog]]
|visualprolog||[[:en:Visual_Prolog|Visual Prolog]]
|-
|-
|<code>whitespace</code>||[[:en:Whitespace_(programming_language)|Whitespace]]
|whitespace||[[:en:Whitespace_(programming_language)|Whitespace]]
|-
|-
|<code>winbatch</code>||[[:en:Winbatch|Winbatch]]
|winbatch||[[:en:Winbatch|Winbatch]]
|-
|-
|<code>xml</code>||[[:en:XML|XML]]
|xml||[[:en:XML|XML]]
|-
|-
|<code>xorg_conf</code>||[[:en:Xorg.conf|Xorg.conf]]
|xorg_conf||[[:en:Xorg.conf|Xorg.conf]]
|-
|-
|<code>xpp</code>||[[:en:Microsoft_Dynamics_AX|X++]]
|xpp||[[:en:Microsoft_Dynamics_AX|X++]]
|-
|-
|<code>z80</code>||[[:en:Zilog Z80|ZiLOG Z80 Assembler]]
|z80||[[:en:Zilog Z80|ZiLOG Z80 Assembler]]
|}
|}
[[Category:Návody]]

Aktuální verze z 27. 4. 2011, 17:34

<source lang="php"> <source lang="c"> <source lang="asm"> <source lang="basic4l">

  • Další viz tabulka dole!
 

<?php     
for ($i=0;$i<=10;$i++) // Příklad cyklu for v php. BY ROMAN SVOBODA

{
echo $i;
}         
?> 

<?php     
$i = 0;
while ($i<=10) { // Příklad cyklu while v php. BY ROMAN SVOBODA

echo $i;

++$i;
}
?>
 
#include <reg51.h>
#include<stdio.h>

void MSdelay (unsigned int);

sbit P10 = 0x90;

/* now the functions may be written to use this location */
void main (void)

{
    /* forever loop, toggling pin 0 of port 1 */
    while (1==1)
    {
        P10 = !P10;
		  P3=0xAA;
        MSdelay (500); /* wait 500 microseconds */
  		  P3=0x55;
        MSdelay (500); /* wait 500 microseconds */
    }
}


void MSdelay (unsigned int itime)

	{
	unsigned int i,j;
	for (i=0;i<itime;i++);
		for (j=0;j<1275;j++);
	
	}
 
$mod51

		org 00h         ;ukládání programu

start:		mov A,#01010111b    ; zápis do akumulátoru
		mov P1,A            ; přesun na bránu P1

		mov  A,#10101000b
		mov P1,A

		sjmp start          ; krátký skok na návěští    
		end

Podporované jazyky

lang=" " Odpovídající jazyk
abap ABAP
actionscript ActionScript
ada Ada
apache Apache Configuration
applescript AppleScript
asm ASM
asp Active Server Pages (ASP)
autoit AutoIt
bash Bash
basic4gl Basic4GL
bf Brainfuck
blitzbasic Blitz BASIC
bnf Backus-Naur Form
c C
c_mac C (Mac)
caddcl AutoCAD DCL
cadlisp AutoLISP
cfdg CFDG
cfm ColdFusion Markup Language
cil Common Intermediate Language (CIL)
cobol COBOL
cpp-qt C++ (Qt toolkit)
cpp C++
csharp C#
css Cascading Style Sheets (CSS)
d D
delphi Delphi
diff Diff
div DIV
dos DOS batch file
dot DOT
eiffel Eiffel
fortran Fortran
freebasic FreeBASIC
genero Genero
gettext GNU internationalization (i18n) library
glsl OpenGL Shading Language (GLSL)
gml Game Maker Language (GML)
gnuplot gnuplot
groovy Groovy
haskell Haskell
hq9plus HQ9+
html4strict HTML
idl Uno IDL
ini INI
inno Inno
intercal INTERCAL
io Io
java Java
java5 Java(TM) 2 Platform Standard Edition 5.0
javascript JavaScript
kixtart KiXtart
klonec Klone C
klonecpp Klone C++
latex LaTeX
lisp Lisp
lolcode LOLCODE
lotusscript LotusScript
lua Lua
lang=" " Odpovídající jazyk
m68k Motorola 68000 Assembler
make make
matlab MATLAB M
mirc mIRC scripting language
mxml MXML
mpasm Microchip Assembler
mysql MySQL
nsis Nullsoft Scriptable Install System (NSIS)
objc Objective-C
ocaml-brief OCaml
ocaml OCaml
oobas OpenOffice.org Basic
oracle8 Oracle 8 SQL
oracle11 Oracle 11 SQL
pascal Pascal
per per
perl Perl
php-brief PHP
php PHP
pixelbender Pixel Bender
plsql PL/SQL
povray Persistence of Vision Raytracer
powershell Windows PowerShell
progress OpenEdge Advanced Business Language
prolog Prolog
providex ProvideX
python Python
qbasic QBasic/QuickBASIC
rails Rails
reg Windows Registry
robots robots.txt
ruby Ruby
sas SAS
scala Scala
scheme Scheme
scilab Scilab
sdlbasic SdlBasic
smalltalk Smalltalk
smarty Smarty
sql SQL
tcl Tcl
teraterm Tera Term
text Plain text
thinbasic thinBasic
tsql Transact-SQL
typoscript TypoScript
vb Visual Basic
vbnet Visual Basic .NET
verilog Verilog
vhdl VHDL
vim Vimscript
visualfoxpro Visual FoxPro
visualprolog Visual Prolog
whitespace Whitespace
winbatch Winbatch
xml XML
xorg_conf Xorg.conf
xpp X++
z80 ZiLOG Z80 Assembler