home *** CD-ROM | disk | FTP | other *** search
Wrap
<?xml version="1.0" encoding="utf-8"?> <html><head><title>=, <, >, <=, >=, <> - Operatoren [Runtime]</title><meta name="filename" content="text/sbasic/common/03110100"/><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{ } span.T1{ font-weight:bold;} </style></head><body> <help:to-be-embedded Eid="operatoren" xmlns:help="http://openoffice.org/2000/help"> <p class="Head1"><help:link Id="66502">=, <, >, <=, >=, <> - Operatoren [Runtime]</help:link></p> <p class="Paragraph">Comparison operators are used to compare two expressions. The result is returned as a Boolean expression that determines whether the comparison is True (-1) or False (0).</p> </help:to-be-embedded> <p class="Paragraph"><span class="T1">Syntax</span>:</p> <p class="Paragraph">Result = Expression1 { = | < | > | <= | >= } Expression2 <help:key-word value="Comparison operators" tag="kw66502_1" xmlns:help="http://openoffice.org/2000/help"/></p> <p class="Paragraph"><span class="T1">Parameter</span>:</p> <p class="Paragraph">Result : Boolean expression that specifies the result of the comparison. The result returned can only be (-1), if comparison is True, or (0) if it is False.</p> <p class="Paragraph">Expression1, Expression2: Any numeric values or strings to be compared.</p> <p class="Paragraph"><span class="T1">Comparison operators</span></p> <p class="Paragraph">= : Equal to</p> <p class="Paragraph">< : Less than</p> <p class="Paragraph">> : Greater than</p> <p class="Paragraph"><= : Less than or equal to</p> <p class="Paragraph">>= : Greater than or equal to</p> <p class="Paragraph"><> : Not equal to</p> <p class="Paragraph"><span class="T1">Example:</span></p> <p class="PropText">Sub ExampleUnequal</p> <p class="PropText">DIM sFile As String</p> <p class="PropText">DIM sRoot As String REM ' Root directory for file in and output</p> <p class="PropText">sRoot = "c:\"</p> <p class="PropText">sFile = Dir$( sRoot ,22)</p> <p class="PropText">If sFile <> "" Then</p> <p class="PropText">Do</p> <p class="PropText">Msgbox sFile</p> <p class="PropText">sFile = Dir$</p> <p class="PropText">Loop Until sFile = ""</p> <p class="PropText">End If</p> <p class="PropText">End sub</p> <p class="PropText"/> </body></html>