home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 December
/
Chip_2003-12_cd2.bin
/
oo
/
download
/
f_0019
/
sbasic.jar
/
text
/
sbasic
/
common
/
03070600.xml
< prev
next >
Wrap
Extensible Markup Language
|
2003-01-16
|
2KB
|
34 lines
<?xml version="1.0" encoding="utf-8"?>
<html><head><title>Operátor Mod [Runtime]</title><meta name="filename" content="text/sbasic/common/03070600"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
p.P1{
}
p.P2{
}
span.T1{
font-weight:bold;}
</style></head><body>
<help:to-be-embedded Eid="mod" xmlns:help="http://openoffice.org/2000/help">
<p class="Head1"><help:link Id="66551">Operátor Mod [Runtime]</help:link></p>
<p class="Paragraph">Vrátí zbytek po dělení čísla.</p>
</help:to-be-embedded>
<p class="Paragraph"><span class="T1">Syntaxe</span>:</p>
<p class="Paragraph">V├╜sledek = V├╜raz 1 MOD V├╜raz 2 <help:key-word value="MOD" tag="kw66551_1" xmlns:help="http://openoffice.org/2000/help"/></p>
<p class="Paragraph"><span class="T1">Vrácená hodnota</span>:</p>
<p class="Paragraph">Typu Integer</p>
<p class="Paragraph"><span class="T1">Parametr</span>:</p>
<p class="Paragraph">Výsledek: Libovolná číselná proměnná, která obsahuje výsledek operace MOD.</p>
<p class="Paragraph">Výraz 1, Výraz 2: Libovolné číselné výrazy, které budou použity k dělení.</p>
<p class="P2">Příklad:</p>
<p class="PropText">sub ExampleMod</p>
<p class="PropText">print 10 mod 2.5 REM returns 0</p>
<p class="PropText">print 10 / 2.5 <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM returns 4</p>
<p class="PropText">print 10 mod 5 <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM returns 0</p>
<p class="PropText">print 10 / 5 <text:s text:c="4" xmlns:text="http://openoffice.org/2000/text"/>REM returns 2</p>
<p class="PropText">print 5 mod 10 <text:s text:c="2" xmlns:text="http://openoffice.org/2000/text"/>REM returns 5</p>
<p class="PropText">print 5 / 10 <text:s text:c="4" xmlns:text="http://openoffice.org/2000/text"/>REM returns 0.5</p>
<p class="PropText">end sub</p>
</body></html>