-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
207 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<!DOCTYPE HTML> | ||
<html lang="de"> | ||
<head> | ||
<title>VerCompare - Syntax & Verwendung | AutoHotkey v2</title> | ||
<meta name="description" content="Die VerCompare-Funktion vergleicht zwei Versionszeichenketten." /> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<link href="../static/theme.css" rel="stylesheet" type="text/css"> | ||
<script src="../static/content.js" type="text/javascript"></script> | ||
<script src="../static/ga4.js" type="text/javascript"></script> | ||
</head> | ||
<body> | ||
|
||
<h1>VerCompare() <span class="ver">[v1.1.36+]</span></h1> | ||
<p>Vergleicht zwei Versionszeichenketten.</p> | ||
<pre class="Syntax">Ergebnis := <span class="func">VerCompare</span>(VersionA, VersionB)</pre> | ||
|
||
<h2 id="Parameters">Parameter</h2> | ||
<dl> | ||
<dt>VersionA</dt> | ||
<dd> | ||
<p>Die erste zu vergleichende Versionszeichenkette.</p> | ||
</dd> | ||
<dt>VersionB</dt> | ||
<dd> | ||
<p>Die zweite zu vergleichende Versionszeichenkette, der optional einer der folgenden Operatoren vorangestellt werden kann: <code><</code>, <code><=</code>, <code>></code>, <code>>=</code> oder <code>=</code>.</p> | ||
</dd> | ||
</dl> | ||
|
||
<h2 id="Return_Value">Rückgabewert</h2> | ||
<p>Wenn <em>VersionB</em> mit einem Operatorsymbol beginnt, gibt diese Funktion 1 (true) oder 0 (false) zurück.</p> | ||
<p>Ansonsten gibt diese Funktion einen der folgenden Werte zurück, um die Beziehung zwischen <em>VersionA</em> und <em>VersionB</em> deutlich zu machen:</p> | ||
<ul> | ||
<li>0, wenn <em>VersionA</em> gleich <em>VersionB</em> ist</li> | ||
<li>einen positiven Integer, wenn <em>VersionA</em> größer als <em>VersionB</em> ist</li> | ||
<li>einen negativen Integer, wenn <em>VersionA</em> kleiner als <em>VersionB</em> ist</li> | ||
</ul> | ||
<p>Um eine bestimmte Beziehung zwischen den beiden Zeichenketten zu überprüfen, vergleichen Sie das Ergebnis mit 0. Zum Beispiel:</p> | ||
<pre>a_kleiner_als_b := VerCompare(a, b) < 0 | ||
a_größer_gleich_b := VerCompare(a, b) >= 0</pre> | ||
|
||
<h2 id="Remarks">Bemerkungen</h2> | ||
<p>Versionszeichenketten verwenden für den Vergleich dieselben Regeln wie <a href="_Requires.htm#VerCompare">#Requires</a>.</p> | ||
<p>Diese Funktion sollte Versionszeichenketten gemäß <a href="https://semver.org/spec/v2.0.0.html">Semantic Versioning 2.0.0</a> korrekt vergleichen, aber die Parameter müssen nicht zwingend gültige SemVer-Zeichenketten sein.</p> | ||
<p>Diese Funktion kann in einem <a href="Sort.htm#callback">Sort-Callback</a> verwendet werden.</p> | ||
|
||
<h2 id="Related">Siehe auch</h2> | ||
<p><a href="Sort.htm">Sort</a></p> | ||
|
||
<h2 id="Examples">Beispiele</h2> | ||
<div class="ex" id="ExBasic"> | ||
<p><a class="ex_number" href="#ExBasic"></a> Prüft die verwendete Version von AutoHotkey.</p> | ||
<pre> | ||
if VerCompare(A_AhkVersion, ">=1.1.36.00") | ||
MsgBox Diese Version hat VerCompare als interne Funktion. | ||
else | ||
MsgBox Diese Version ist kleiner als 1.1.36.00. | ||
</pre> | ||
</div> | ||
|
||
<div class="ex" id="ExPre"> | ||
<p><a class="ex_number" href="#ExPre"></a> Demonstriert den Vergleich mit Vorabversionen.</p> | ||
<pre> | ||
MsgBox % VerCompare("2.0-a137", "2.0-a136") <em>; Gibt 1 zurück</em> | ||
MsgBox % VerCompare("2.0-a137", "2.0") <em>; Gibt -1 zurück</em> | ||
MsgBox % VerCompare("10.2-beta.3", "10.2.0") <em>; Gibt -1 zurück</em> | ||
</pre> | ||
</div> | ||
|
||
<div class="ex" id="ExPreRange"> | ||
<p><a class="ex_number" href="#ExPreRange"></a> Demonstriert eine Bereichsprüfung.</p> | ||
<pre> | ||
MsgBox % VerCompare("2.0.1", ">=2.0") && VerCompare("2.0.1", "<2.1") <em>; Gibt 1 zurück</em> | ||
</pre> | ||
</div> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.