n.n...n のフォームでソフトウェアのバージョンを表すクラス。
説明
{package MY-PACKAGE,
|| This is ok, because a VersionNumber is expected
|| for the built in version attribute.
version="1.3",
|| This is just a string because the system doesn't
|| know anything about the expected type of my-version.
my-version="1.3",
|| This is ok.
another-version={VersionNumber 1,3}
}
{import ANOTHER-PACKAGE, version="1.4.5"}
{let public constant version:VersionNumber = "2.4"}
| バージョン番号を初期化します。 |
| 文字列から VersionNumber を作成します。 |
| バージョン内のコンポーネントの数。 |
| other のバージョンとの比較を行ないます。 |
| 0 から開始して、バージョン番号の n 番目のコンポーネントを返します。 |
| n 個のコンポーネントを含む、このバージョン番号のコピーを返します。 |
| 最初の n 個のコンポーネントが同じ場合に true を返します。 |
| この次のバージョンを返します。 |
| other がこのバージョンと部分的に一致するかどうかを示します。 |
バージョン番号を初期化します。
文字列から VersionNumber を作成します。
戻り値
バージョン内のコンポーネントの数。
説明
other のバージョンとの比較を行ないます。
戻り値
説明
n 個のコンポーネントを含む、このバージョン番号のコピーを返します。
説明
例
| 例: VersionNumber.n-clone の使用 | |
![]() | |
{define-proc {make-table max-n:int =4, ...:VersionNumber}:Table
let table:Table =
{Table cell-border-width=1, cell-border-color="black"}
|| Column labels
{for n = 1 to max-n do
{table.add row = 1, column = n,
{cell background="beige", n == {value n}}
}
}
|| Generate table rows
{for version key i in ... do
let row = i + 2
{table.add row = row, column = 0,
{cell background="beige", {value version}}
}
{for n = 1 to max-n do
|| Add cloned number to table cell
{table.add row = row, column = n,
{version.n-clone n = n}
}
}
}
{return table}
}
{make-table "1.2.3", "1.2.3+"}
|
最初の n 個のコンポーネントが同じ場合に true を返します。
この次のバージョンを返します。
説明
例
| 例: VersionNumber.next-version の使用 | |
![]() | |
{define-proc {make-table max-n:int =4, ...:VersionNumber}:Table
let table:Table =
{Table cell-border-width=1, cell-border-color="black"}
|| Column labels
{for n = 1 to max-n do
{table.add row = 1, column = n,
{cell background="beige", n == {value n}}
}
}
|| Generate table rows
{for version key i in ... do
let row = i + 2
{table.add row = row, column = 0,
{cell background="beige", {value version}}
}
{for n = 1 to max-n do
|| Add next version to table cell
{table.add row = row, column = n,
{version.next-version n = n}
}
}
}
{return table}
}
{make-table "1.2.3", "1.2.3+"}
|
other がこのバージョンと部分的に一致するかどうかを示します。
説明