mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-24 14:22:40 -06:00
Documentation updates
git-svn-id: svn://ultimatepp.org/upp/trunk@636 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
95c5597cae
commit
b3995e25c2
7 changed files with 805 additions and 608 deletions
|
|
@ -10,11 +10,12 @@ topic "Date formatting and scanning";
|
|||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[{_}%EN-US
|
||||
[s0;%- Date formatting and scanning&]
|
||||
[s0;3 &]
|
||||
[s5;K%- [@(0.0.255) const][@(64) _][@(0.0.255) char][@(64) _`*]StrToDate[@(64) (][^`:`:Date^@(64) D
|
||||
ate][@(64) `&_][@3 d][@(64) , ][@(0.0.255) const][@(64) _][@(0.0.255) char][@(64) _`*][@3 s][@(64) )
|
||||
]&]
|
||||
[s0;%- [*@3;4 Date formatting and scanning]&]
|
||||
[s0; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Global functions]]}}&]
|
||||
[s0;%- &]
|
||||
[s5;:StrToDate`(Date`&`,const char`*`):%- [@(0.0.255) const]_[@(0.0.255) char]_`*[* StrToDa
|
||||
te]([_^Date^ Date][@(0.0.255) `&]_[*@3 d], [@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 s])&]
|
||||
[s2; Scans a string for a Date. Order of day, month and year is specified
|
||||
using SetDateScan. In place of month both number and text is
|
||||
accepted `- text must match abbreviated or full name of month.&]
|
||||
|
|
@ -22,33 +23,39 @@ accepted `- text must match abbreviated or full name of month.&]
|
|||
[s7; [%-*C@3 s]-|String to scan.&]
|
||||
[s7; [*/ Return value]-|NULL if no date is found in s or position right
|
||||
after the date.&]
|
||||
[s0;3 &]
|
||||
[s5;K%- [^`:`:String^ String]_Format[@(64) (][^`:`:Date^@(64) Date][@(64) _][@3 date][@(64) )]&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Format`(Date`):%- [_^String^ String]_[* Format]([_^Date^ Date]_[*@3 date])&]
|
||||
[s2; Formats date. Date is formated using the standard Format function,
|
||||
where the string set by SetDateFormat is used as formating string,
|
||||
and the three supplied integer value arguments are year, month
|
||||
and day.&]
|
||||
[s7; [%-*C@3 date]-|Date to format.&]
|
||||
[s7; [*/ Return value]-|Formatted date.&]
|
||||
[s0;3 &]
|
||||
[s5;K%- [@(0.0.255) int][@(64) _]CharFilterDate[@(64) (][@(0.0.255) int][@(64) _][@3 c][@(64) )]&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:CharFilterDate`(int`):%- [@(0.0.255) int]_[* CharFilterDate]([@(0.0.255) int]_[*@3 c])&]
|
||||
[s2; Character filter for dates. Its behaviour is specified by SetDateFilter
|
||||
function.&]
|
||||
[s7; [%-*C@3 c]-|Character to filter.&]
|
||||
[s7; [*/ Return value]-|Filtered character.&]
|
||||
[s0; &]
|
||||
[s0;%- void_[* SetDateFormat](const_char_`*[*@3 fmt])&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:SetDateFormat`(const char`*`):%- [@(0.0.255) void]_[* SetDateFormat]([@(0.0.255) const
|
||||
]_[@(0.0.255) char]_`*[*@3 fmt])&]
|
||||
[s2; Sets formating string for dates.&]
|
||||
[s7; [%-*C@3 fmt]-|Formating string.&]
|
||||
[s0;3 &]
|
||||
[s5;K%- [@(0.0.255) void][@(64) _]SetDateScan[@(64) (][@(0.0.255) const][@(64) _][@(0.0.255) char
|
||||
][@(64) _`*][@3 scan][@(64) )]&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:SetDateScan`(const char`*`):%- [@(0.0.255) void]_[* SetDateScan]([@(0.0.255) const]_[@(0.0.255) c
|
||||
har]_`*[*@3 scan])&]
|
||||
[s2; Sets date scan string `- this string represents order of day,
|
||||
month and year for StrToDate function.&]
|
||||
[s7; [%-*C@3 scan]-|Date scan string.&]
|
||||
[s0;3 &]
|
||||
[s5;K%- [@(0.0.255) void][@(64) _]SetDateFilter[@(64) (][@(0.0.255) const][@(64) _][@(0.0.255) ch
|
||||
ar][@(64) _`*][@3 seps][@(64) )]&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:SetDateFilter`(const char`*`):%- [@(0.0.255) void]_[* SetDateFilter]([@(0.0.255) const
|
||||
]_[@(0.0.255) char]_`*[*@3 seps])&]
|
||||
[s2; Specifies CharFilterDate behaviour. Digits are always allowed
|
||||
in CharFilterDate. If there is `"a`" at the beginning of seps
|
||||
string, letters are allowed. If there is `"A`", letters are allowed
|
||||
|
|
@ -57,5 +64,5 @@ list of characters allowed as separator follows. `"`\a`" after
|
|||
character designates `"amend`" character `- if used, all characters
|
||||
up to next `"amend`" character are replaced by it.&]
|
||||
[s7; [%-*C@3 seps]-|Filter`-string.&]
|
||||
[s0;3 &]
|
||||
[s1; &]
|
||||
[s0; ]
|
||||
|
|
@ -11,8 +11,7 @@ topic "Miscellaneous";
|
|||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[{_}%EN-US
|
||||
[s1; [*@3;4 Exc]&]
|
||||
[s0; &]
|
||||
[s1;:Exc`:`:class:%- [@(0.0.255)3 class][3 _][*3 Exc][3 _:_][@(0.0.255)3 public][3 _][*@3;3 String]&]
|
||||
[s0;%- [@(0.0.255)3 class][3 _][*3 Exc][3 _:_][@(0.0.255)3 public][3 _][*@3;3 String]&]
|
||||
[s0; &]
|
||||
[s0; This is the preferred root class of U`+`+ exception. It is basically
|
||||
a String. The idea is that all kinds of exception can be either
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ topic "Text formatting";
|
|||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[{_}%EN-US
|
||||
[s0; [*4 Format `- text formatting]&]
|
||||
[s0; [*@3;4 Format `- text formatting]&]
|
||||
[s0;*+117 &]
|
||||
[s5;:`:`:Format`(const char`*`,const`:`:Vector`<`:`:Value`>`&`):%- [^`:`:String^ String
|
||||
]_[* Format][@(64) (][@(0.0.255) const][@(64) _][@(0.0.255) char][@(64) _`*][*@3 format][@(64) ,
|
||||
|
|
@ -345,12 +345,13 @@ width&]
|
|||
][^Formatting^@(64) Formatting][@(64) `&_fmt)]&]
|
||||
[s2; Formatter has to have form of function with single [^Formatting^ Formatting]
|
||||
argument.&]
|
||||
[s3; &]
|
||||
[s1; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Formatting]]}}&]
|
||||
[s4;%- &]
|
||||
[s0;%- &]
|
||||
[s1;:Formatting`:`:struct:%- [@(0.0.255) struct]_[* Formatting]&]
|
||||
[s2; This structure passes all informations to format Value argument
|
||||
to the formatter.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Formatting`:`:language:%- [@(0.0.255) int]_[* language]&]
|
||||
[s2; Language of resulting text.&]
|
||||
|
|
@ -366,7 +367,7 @@ to the formatter.&]
|
|||
[s4;%- &]
|
||||
[s5;:Formatting`:`:id:%- String_[* id]&]
|
||||
[s2; Formatter`-id.&]
|
||||
[s3; &]
|
||||
[s1; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Format registration functions]]}}&]
|
||||
[s3;%- &]
|
||||
[s5;:RegisterFormatter`(int`,const char`*`,Formatter`)init`_:%- [@(0.0.255) void]_[* Regi
|
||||
|
|
@ -407,4 +408,5 @@ terNullFormatter]([@(0.0.255) const]_[@(0.0.255) char]_`*[*@3 id],
|
|||
Formatter_[*@3 f])&]
|
||||
[s2; Registers formatter [%-*@3 id] to be applied when the Value argument
|
||||
is Void (Value()) or ErrorValue.&]
|
||||
[s1; &]
|
||||
[s0; ]
|
||||
|
|
@ -1,123 +1,128 @@
|
|||
topic "Formatting functions";
|
||||
[ $$0,0#00000000000000000000000000000000:Default]
|
||||
[l288;2 $$1,0#27521748481378242620020725143825:desc]
|
||||
[H6;0 $$2,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$3,0#37138531426314131252341829483370:item]
|
||||
[0 $$4,0#96390100711032703541132217272105:end]
|
||||
[2 $$0,0#00000000000000000000000000000000:Default]
|
||||
[i448;a25;kKO9;2 $$1,0#37138531426314131252341829483380:class]
|
||||
[l288;2 $$2,0#27521748481378242620020725143825:desc]
|
||||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:item]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[l288;i1121;b17;O9;~~~.1408;2 $$7,0#10431211400427159095818037425705:param]
|
||||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[{_}%EN-US
|
||||
[s0; [*4 Formatting functions]&]
|
||||
[s0; [*@3;4 Formatting functions]&]
|
||||
[s0; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Global functions]]}}&]
|
||||
[s2;H0;%- &]
|
||||
[s3;:FormatInt`(int`):%- [_^String^ String]_[* FormatInt]([@(0.0.255) int]_[*@3 i])&]
|
||||
[s1; Outputs decimally formatted signed integer [%-*@3 i] without `+
|
||||
[s4;H0;%- &]
|
||||
[s5;:FormatInt`(int`):%- [_^String^ String]_[* FormatInt]([@(0.0.255) int]_[*@3 i])&]
|
||||
[s2; Outputs decimally formatted signed integer [%-*@3 i] without `+
|
||||
or any paddings. Supposed to be quite fast. Equivalent to FormatIntBase(i,
|
||||
10).&]
|
||||
[s4;* &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntDec`(int`,int`,char`,bool`):%- [_^String^ String]_[* FormatIntDec]([@(0.0.255) i
|
||||
[s3;* &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntDec`(int`,int`,char`,bool`):%- [_^String^ String]_[* FormatIntDec]([@(0.0.255) i
|
||||
nt]_[*@3 i], [@(0.0.255) int]_[*@3 width], [@(0.0.255) char]_[*@3 lpad]_`=_`'_`',
|
||||
[@(0.0.255) bool]_[*@3 always`_sign]_`=_[@(0.0.255) false])&]
|
||||
[s1; Formats a signed decimal integer [%-*@3 i] with left padding up
|
||||
[s2; Formats a signed decimal integer [%-*@3 i] with left padding up
|
||||
to given [%-*@3 width] characters (output longer than this is not
|
||||
padded) with a given [%-*@3 lpad] character. If [%-*@3 always`_sign
|
||||
]is true, start positive numbers with `'`+`' (negative numbers
|
||||
always start with `'`-`').&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntHex`(int`,int`,char`):%- [_^String^ String]_[* FormatIntHex]([@(0.0.255) int]_
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntHex`(int`,int`,char`):%- [_^String^ String]_[* FormatIntHex]([@(0.0.255) int]_
|
||||
[*@3 i], [@(0.0.255) int]_[*@3 width]_`=_[@3 8], [@(0.0.255) char]_[*@3 lpad]_`=_`'[@3 0]`')&]
|
||||
[s1;~~~.1152; Formats an unsigned hexadecimal (radix 16) integer
|
||||
[s2;~~~.1152; Formats an unsigned hexadecimal (radix 16) integer
|
||||
[%-*@3 i] with left padding up to given [%-*@3 width] characters
|
||||
(output longer than this is not padded) with a given [%-*@3 lpad]
|
||||
character.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntOct`(int`,int`,char`):%- [_^String^ String]_[* FormatIntOct]([@(0.0.255) int]_
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntOct`(int`,int`,char`):%- [_^String^ String]_[* FormatIntOct]([@(0.0.255) int]_
|
||||
[*@3 i], [@(0.0.255) int]_[*@3 width]_`=_[@3 12], [@(0.0.255) char]_[*@3 lpad]_`=_`'[@3 0]`')&]
|
||||
[s1; Formats an unsigned octal (radix 8) integer [%-*@3 i] with left
|
||||
[s2; Formats an unsigned octal (radix 8) integer [%-*@3 i] with left
|
||||
padding up to given [%-*@3 width] characters (output longer than
|
||||
this is not padded) with a given [%-*@3 lpad] character.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntRoman`(int`,bool`):%- [_^String^ String]_[* FormatIntRoman]([@(0.0.255) int]_
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntRoman`(int`,bool`):%- [_^String^ String]_[* FormatIntRoman]([@(0.0.255) int]_
|
||||
[*@3 i], [@(0.0.255) bool]_[*@3 upper]_`=_[@(0.0.255) false])&]
|
||||
[s1; Formats a signed integer [%-*@3 i] in Roman numerals. The biggest
|
||||
[s2; Formats a signed integer [%-*@3 i] in Roman numerals. The biggest
|
||||
`"implemented`" numeral is M (1000), so expect quite a long return
|
||||
string when formatting a billion. Negative numbers are prepended
|
||||
with `[`-`], 0 or Null is output as a Null String. If [%-*@3 upper]
|
||||
is true, use uppercase `[true`] or lowercase `[false`] letters&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntAlpha`(int`,bool`):%- [_^String^ String]_[* FormatIntAlpha]([@(0.0.255) int]_
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntAlpha`(int`,bool`):%- [_^String^ String]_[* FormatIntAlpha]([@(0.0.255) int]_
|
||||
[*@3 i], [@(0.0.255) bool]_[*@3 upper]_`=_[@(0.0.255) true])&]
|
||||
[s1; Formats a signed integer [%-*@3 i] in length`-first lexicographic
|
||||
[s2; Formats a signed integer [%-*@3 i] in length`-first lexicographic
|
||||
index, i.e. excel column numbering (1 `= A,2 `= B.. 26 `= Z,
|
||||
27 `= AA, 28 `= AB .. 52 `= AZ, 53 `= BA ... 78 `= BZ etc). 0
|
||||
or Null is output as a Null String. Only negative numbers are
|
||||
prepended with a `[`-`]. If [%-*@3 upper] is true, use uppercase
|
||||
letter.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:Format64`(uint64`):%- [_^String^ String]_[* Format64]([_^uint64^ uint64]_[*@3 a])&]
|
||||
[s1; Formats an unsigned decimal 64`-bit integer [%-*@3 a]. Supposed
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Format64`(uint64`):%- [_^String^ String]_[* Format64]([_^uint64^ uint64]_[*@3 a])&]
|
||||
[s2; Formats an unsigned decimal 64`-bit integer [%-*@3 a]. Supposed
|
||||
to be quite fast.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:Format64Hex`(uint64`):%- [_^String^ String]_[* Format64Hex]([_^uint64^ uint64]_[*@3 a])&]
|
||||
[s1; Formats an unsigned hexadecimal [%-*@3 a] (radix 16) 64`-bit integer.
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:Format64Hex`(uint64`):%- [_^String^ String]_[* Format64Hex]([_^uint64^ uint64]_[*@3 a])&]
|
||||
[s2; Formats an unsigned hexadecimal [%-*@3 a] (radix 16) 64`-bit integer.
|
||||
Supposed to be quite fast. Lowecase letters a`-f are used for
|
||||
digits `[10`] through `[15`].&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntHex`(const void`*`):%- [_^String^ String]_[* FormatIntHex]([@(0.0.255) const]_
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntHex`(const void`*`):%- [_^String^ String]_[* FormatIntHex]([@(0.0.255) const]_
|
||||
[@(0.0.255) void]_`*[*@3 ptr])&]
|
||||
[s1; Formats the pointer address [%-*@3 ptr] as a hexadecimal (base
|
||||
[s2; Formats the pointer address [%-*@3 ptr] as a hexadecimal (base
|
||||
16) number zero`-padded to the number of digits appropriate for
|
||||
the memory model (8 digits in 32`-bit systems, 16 digits in 64`-bit
|
||||
systems). Useful for logging and debugging purposes. Equivalent
|
||||
to FormatHex, god knows why there are two of them.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatHex`(const void`*`):%- [_^String^ String]_[* FormatHex]([@(0.0.255) const]_[@(0.0.255) v
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatHex`(const void`*`):%- [_^String^ String]_[* FormatHex]([@(0.0.255) const]_[@(0.0.255) v
|
||||
oid]_`*[*@3 ptr])&]
|
||||
[s1; Same as FormatIntHex.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatInteger`(int`):%- [_^String^ String]_[* FormatInteger]([@(0.0.255) int]_[*@3 a])&]
|
||||
[s1; Formats a signed decimal integer without padding. In comparison
|
||||
[s2; Same as FormatIntHex.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatInteger`(int`):%- [_^String^ String]_[* FormatInteger]([@(0.0.255) int]_[*@3 a])&]
|
||||
[s2; Formats a signed decimal integer without padding. In comparison
|
||||
to FormatInt it returns String(Null) when given int(Null) whereas
|
||||
FormatInt returns a plain empty string.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatUnsigned`(unsigned long`):%- [_^String^ String]_[* FormatUnsigned]([@(0.0.255) u
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatUnsigned`(unsigned long`):%- [_^String^ String]_[* FormatUnsigned]([@(0.0.255) u
|
||||
nsigned]_[@(0.0.255) long]_[*@3 a])&]
|
||||
[s1; A very old freak, implemented through Sprintf(`"%u`", a). Deprecated.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatDouble`(double`):%- [_^String^ String]_[* FormatDouble]([@(0.0.255) double]_[*@3 a
|
||||
[s2; A very old freak, implemented through Sprintf(`"%u`", a). Deprecated.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatDouble`(double`):%- [_^String^ String]_[* FormatDouble]([@(0.0.255) double]_[*@3 a
|
||||
])&]
|
||||
[s1; Formats a floating point [%-*@3 a] in decimal notation automatically
|
||||
[s2; Formats a floating point [%-*@3 a] in decimal notation automatically
|
||||
selecting ordinary or scientific (exponential) notation according
|
||||
to the absolute value of a. In ordinary notation, the number
|
||||
is formatted to 10 significant digits; in exponential notation,
|
||||
the mantissa is formatted to 10 decimal digits.&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatBool`(bool`):%- [_^String^ String]_[* FormatBool]([@(0.0.255) bool]_[*@3 a])&]
|
||||
[s1; Formats a boolean [%-*@3 a] as one of the fixed words `"true`"
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatBool`(bool`):%- [_^String^ String]_[* FormatBool]([@(0.0.255) bool]_[*@3 a])&]
|
||||
[s2; Formats a boolean [%-*@3 a] as one of the fixed words `"true`"
|
||||
or `"false`" (regardless of language settings).&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatInt64`(int64`):%- [_^String^ String]_[* FormatInt64]([_^int64^ int64]_[*@3 a])&]
|
||||
[s1; Formats a signed decimal 64`-bit integer [%-*@3 a] without any
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatInt64`(int64`):%- [_^String^ String]_[* FormatInt64]([_^int64^ int64]_[*@3 a])&]
|
||||
[s2; Formats a signed decimal 64`-bit integer [%-*@3 a] without any
|
||||
padding. Only negative numbers are prepended with a `[`-`].&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatDouble`(double`,int`,int`,int`):%- [_^String^ String]_[* FormatDouble]([@(0.0.255) d
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatDouble`(double`,int`,int`,int`):%- [_^String^ String]_[* FormatDouble]([@(0.0.255) d
|
||||
ouble]_[*@3 d], [@(0.0.255) int]_[*@3 digits], [@(0.0.255) int]_[*@3 flags]_`=_[@3 0],
|
||||
[@(0.0.255) int]_[*@3 fill`_exp]_`=_[@3 0])&]
|
||||
[s1; Formats a floating point number [%-*@3 d] in decimal notation
|
||||
[s2; Formats a floating point number [%-*@3 d] in decimal notation
|
||||
automatically selecting ordinary or scientific (exponential)
|
||||
notation according to the absolute value of a and the given number
|
||||
of [%-*@3 digits]. In the (default) absolute decimal mode, a number
|
||||
|
|
@ -128,68 +133,69 @@ notation whenever its absolute value exceeds the interval `[10`^`-<2
|
|||
`* digits>, 10`^`+<2 `* digits>`]. [%-*@3 flags] can be a binary
|
||||
combination ([@(0.0.255) `|]) of&]
|
||||
[s0; &]
|
||||
[ {{2098:7902<288;h1; [s0; [2 FD`_SIGN]]
|
||||
:: [s0; [/2 always prepend sign (`+10)]]
|
||||
:: [s0; [2 FD`_REL]]
|
||||
:: [s0; [/2 relative decimal places (valid digits)]]
|
||||
:: [s0; [2 FD`_SIGN`_EXP]]
|
||||
:: [s0; [/2 always prepend sign to exponent (1e`+2)]]
|
||||
:: [s0; [2 FD`_CAP`_E]]
|
||||
:: [s0; [/2 capital E for exponent (1E10)]]
|
||||
:: [s0; [2 FD`_ZERO]]
|
||||
:: [s0; [/2 keep trailing zeros (1.25000)]]
|
||||
:: [s0; [2 FD`_FIX]]
|
||||
:: [s0; [/2 always use fixed notation (FormatDouble only)]]
|
||||
:: [s0; [2 FD`_EXP]]
|
||||
:: [s0; [/2 always use exponential notation (FormatDouble only)]]}}&]
|
||||
[s1; &]
|
||||
[s1; [*@3 fill`_exp ]is left zero`-padding of exponent in exponential
|
||||
[ {{2098:7902<288;h1; [s0; FD`_SIGN]
|
||||
:: [s0; [/ always prepend sign (`+10)]]
|
||||
:: [s0; FD`_REL]
|
||||
:: [s0; [/ relative decimal places (valid digits)]]
|
||||
:: [s0; FD`_SIGN`_EXP]
|
||||
:: [s0; [/ always prepend sign to exponent (1e`+2)]]
|
||||
:: [s0; FD`_CAP`_E]
|
||||
:: [s0; [/ capital E for exponent (1E10)]]
|
||||
:: [s0; FD`_ZERO]
|
||||
:: [s0; [/ keep trailing zeros (1.25000)]]
|
||||
:: [s0; FD`_FIX]
|
||||
:: [s0; [/ always use fixed notation (FormatDouble only)]]
|
||||
:: [s0; FD`_EXP]
|
||||
:: [s0; [/ always use exponential notation (FormatDouble only)]]}}&]
|
||||
[s2; &]
|
||||
[s2; [*@3 fill`_exp ]is left zero`-padding of exponent in exponential
|
||||
notation&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatDoubleFix`(double`,int`,int`):%- [_^String^ String]_[* FormatDoubleFix]([@(0.0.255) d
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatDoubleFix`(double`,int`,int`):%- [_^String^ String]_[* FormatDoubleFix]([@(0.0.255) d
|
||||
ouble]_[*@3 d], [@(0.0.255) int]_[*@3 digits], [@(0.0.255) int]_[*@3 flags]_`=_[@3 0])&]
|
||||
[s1; Formats a floating point number [%-*@3 d] in ordinary decimal
|
||||
[s2; Formats a floating point number [%-*@3 d] in ordinary decimal
|
||||
notation (whole part, comma, decimal part). Then number of [%-*@3 digits]
|
||||
can be interpreted either as the absolute number of decimal digits
|
||||
(the default mode) or the relative number of significant digits
|
||||
excluding leading zeros. Decimal point is always output as a
|
||||
period independent on language settings. [%-*@3 flags] can be a
|
||||
binary combination ([@(0.0.255) `|]) of&]
|
||||
[ {{2098:7902<288;h1; [s0; [2 FD`_SIGN]]
|
||||
:: [s0; [/2 always prepend sign (`+10)]]
|
||||
:: [s0; [2 FD`_REL]]
|
||||
:: [s0; [/2 relative decimal places (valid digits)]]
|
||||
:: [s0; [2 FD`_ZERO]]
|
||||
:: [s0; [/2 keep trailing zeros (1.25000)]]}}&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatDoubleExp`(double`,int`,int`,int`):%- [_^String^ String]_[* FormatDoubleExp]([@(0.0.255) d
|
||||
[ {{2098:7902<288;h1; [s0; FD`_SIGN]
|
||||
:: [s0; [/ always prepend sign (`+10)]]
|
||||
:: [s0; FD`_REL]
|
||||
:: [s0; [/ relative decimal places (valid digits)]]
|
||||
:: [s0; FD`_ZERO]
|
||||
:: [s0; [/ keep trailing zeros (1.25000)]]}}&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatDoubleExp`(double`,int`,int`,int`):%- [_^String^ String]_[* FormatDoubleExp]([@(0.0.255) d
|
||||
ouble]_[*@3 d], [@(0.0.255) int]_[*@3 digits], [@(0.0.255) int]_[*@3 flags]_`=_[@3 0],
|
||||
[@(0.0.255) int]_[*@3 fill`_exp]_`=_[@3 0])&]
|
||||
[s1; Formats a floating point number [%-*@3 d] in scientific / exponential
|
||||
[s2; Formats a floating point number [%-*@3 d] in scientific / exponential
|
||||
notation (sign, single digit, period, decimal part, `"e`" decimal
|
||||
exponent) with given number of [%-*@3 digits]. [%-*@3 flags] can
|
||||
be a binary combination ([@(0.0.255) `|]) of&]
|
||||
[s1; &]
|
||||
[ {{2098:7902<288;h1; [s0; [2 FD`_SIGN]]
|
||||
:: [s0; [/2 always prepend sign (`+10)]]
|
||||
:: [s0; [2 FD`_SIGN`_EXP]]
|
||||
:: [s0; [/2 always prepend sign to exponent (1e`+2)]]
|
||||
:: [s0; [2 FD`_CAP`_E]]
|
||||
:: [s0; [/2 capital E for exponent (1E10)]]
|
||||
:: [s0; [2 FD`_ZERO]]
|
||||
:: [s0; [/2 keep trailing zeros (1.25000)]]}}&]
|
||||
[s1; &]
|
||||
[s1; [*@3 fill`_exp ]is left zero`-padding of exponent in exponential
|
||||
[s2; &]
|
||||
[ {{2098:7902<288;h1; [s0; FD`_SIGN]
|
||||
:: [s0; [/ always prepend sign (`+10)]]
|
||||
:: [s0; FD`_SIGN`_EXP]
|
||||
:: [s0; [/ always prepend sign to exponent (1e`+2)]]
|
||||
:: [s0; FD`_CAP`_E]
|
||||
:: [s0; [/ capital E for exponent (1E10)]]
|
||||
:: [s0; FD`_ZERO]
|
||||
:: [s0; [/ keep trailing zeros (1.25000)]]}}&]
|
||||
[s2; &]
|
||||
[s2; [*@3 fill`_exp ]is left zero`-padding of exponent in exponential
|
||||
notation&]
|
||||
[s4; &]
|
||||
[s2;%- &]
|
||||
[s3;:FormatIntBase`(int`,int`,int`,char`,int`):%- [_^String^ String]_[* FormatIntBase]([@(0.0.255) i
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:FormatIntBase`(int`,int`,int`,char`,int`):%- [_^String^ String]_[* FormatIntBase]([@(0.0.255) i
|
||||
nt]_[*@3 i], [@(0.0.255) int]_[*@3 base], [@(0.0.255) int]_[*@3 width]_`=_[@3 0],
|
||||
[@(0.0.255) char]_[*@3 lpad]_`=_`'_`', [@(0.0.255) int]_[*@3 sign]_`=_[@3 0])&]
|
||||
[s1; Formats a signed or unsigned integer [%-*@3 i] in a given radix
|
||||
[s2; Formats a signed or unsigned integer [%-*@3 i] in a given radix
|
||||
[%-*@3 base] with left padding to given [%-*@3 width] with a given
|
||||
[%-*@3 lpad] character. If [*@3 sign ]is `+1 `= always prepend `'`+`'/`-,
|
||||
if 0 `= auto (`'`-`' only), if `-1, format as unsigned.&]
|
||||
[s1; &]
|
||||
[s0; ]
|
||||
|
|
@ -10,53 +10,55 @@ topic "NetNode";
|
|||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[{_}
|
||||
[s0; [@(0.0.255) class]_[* NetNode]_:_[@(0.0.255) private]_[*@3 Moveable][@(0.0.255) <][* NetNode][@(0.0.255) >
|
||||
]_&]
|
||||
[s2;%% &]
|
||||
[s2;%% This class represents single network node (network resource).
|
||||
[s0; [*@3;4 NetNode]&]
|
||||
[s1;:NetNode`:`:class: [@(0.0.255)3 class][3 _][*3 NetNode][3 _:_][@(0.0.255)3 private][3 _][*@3;3 M
|
||||
oveable][@(0.0.255)3 <][*3 NetNode][@(0.0.255)3 >][3 _]&]
|
||||
[s6;l0;%% WIN32 specific&]
|
||||
[s6;l0;%% &]
|
||||
[s0;%% This class represents single network node (network resource).
|
||||
It is [^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ moveable] and
|
||||
has deep copy.&]
|
||||
[s0;%% &]
|
||||
[s1;%% &]
|
||||
[ {{10000F(128)G(128)@1 [s0;%% [* Constructor Detail]]}}&]
|
||||
[s0; &]
|
||||
[s5;:NetNode`:`:NetNode`(`): [* NetNode]()&]
|
||||
[s2;%% Default constructor.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:GetName`(`)const: [_^`:`:String^ String]_[* GetName]()_[@(0.0.255) cons
|
||||
t]&]
|
||||
[s5;:NetNode`:`:NetNode`(const NetNode`&`): [* NetNode]([@(0.0.255) const]_[* NetNode][@(0.0.255) `&
|
||||
]_[*@3 s])&]
|
||||
[s2;%% Deep copy constructor.&]
|
||||
[s1;%% &]
|
||||
[ {{10000F(128)G(128)@1 [s0;%% [* Public Member List]]}}&]
|
||||
[s0; &]
|
||||
[s5;:NetNode`:`:GetName`(`)const: [_^String^ String]_[* GetName]()_[@(0.0.255) const]&]
|
||||
[s2;%% Returns the name of network node (e.g. for displaying in GUI).&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:GetPath`(`)const: [_^`:`:String^ String]_[* GetPath]()_[@(0.0.255) cons
|
||||
t]&]
|
||||
[s5;:NetNode`:`:GetPath`(`)const: [_^String^ String]_[* GetPath]()_[@(0.0.255) const]&]
|
||||
[s2;%% If node represents a disk share, it returns a path to this
|
||||
share (like `\`\SERVER`\DATA). FindFile can be used to retrieve
|
||||
the list of files on this path (you have to add a file mask).
|
||||
If this method returns empty String, node is not a disk share.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:Enum`(`)const: [_^`:`:Array^ Array][@(0.0.255) <][_^`:`:NetNode^ NetNod
|
||||
e][@(0.0.255) >]_[* Enum]()_[@(0.0.255) const]&]
|
||||
[s5;:NetNode`:`:Enum`(`)const: [_^Array^ Array][@(0.0.255) <][_^NetNode^ NetNode][@(0.0.255) >
|
||||
]_[* Enum]()_[@(0.0.255) const]&]
|
||||
[s2;%% Returns the array of subnodes.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:Serialize`(`:`:Stream`&`): [@(0.0.255) void]_[* Serialize]([_^`:`:Stream^ S
|
||||
tream][@(0.0.255) `&]_[*@3 s])&]
|
||||
[s5;:NetNode`:`:Serialize`(Stream`&`): [@(0.0.255) void]_[* Serialize]([_^Stream^ Stream][@(0.0.255) `&
|
||||
]_[*@3 s])&]
|
||||
[s2;%% Serializes the Node.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:EnumRoot`(`): [@(0.0.255) static] [_^`:`:Array^ Array][@(0.0.255) <][_^`:`:NetNode^ N
|
||||
[s5;:NetNode`:`:EnumRoot`(`): [@(0.0.255) static] [_^Array^ Array][@(0.0.255) <][_^NetNode^ N
|
||||
etNode][@(0.0.255) >]_[* EnumRoot]()&]
|
||||
[s2;%% Enumerates root nodes.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:NetNode`(`): [* NetNode]()&]
|
||||
[s2;%% Default constructor.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:NetNode`(const`:`:NetNode`&`): [* NetNode]([@(0.0.255) const]_[* NetNod
|
||||
e][@(0.0.255) `&]_[*@3 s])&]
|
||||
[s2;%% Deep copy constructor.&]
|
||||
[s3; &]
|
||||
[s4; &]
|
||||
[s5;:`:`:NetNode`:`:operator`=`(const`:`:NetNode`&`): [_^`:`:NetNode^ NetNode][@(0.0.255) `&
|
||||
]_[* operator`=]([@(0.0.255) const]_[_^`:`:NetNode^ NetNode][@(0.0.255) `&]_[*@3 s])&]
|
||||
[s5;:NetNode`:`:operator`=`(const NetNode`&`): [_^NetNode^ NetNode][@(0.0.255) `&]_[* opera
|
||||
tor`=]([@(0.0.255) const]_[_^NetNode^ NetNode][@(0.0.255) `&]_[*@3 s])&]
|
||||
[s2;%% Deep copy assignment.&]
|
||||
[s0;%% ]
|
||||
[s1; &]
|
||||
[s0; ]
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -10,6 +10,7 @@ topic "VectorMap";
|
|||
[i448;b42;O9;2 $$8,8#61672508125594000341940100500538:tparam]
|
||||
[b42;2 $$9,9#13035079074754324216151401829390:normal]
|
||||
[{_}%EN-US
|
||||
[s1;:noref: [*@3;4 Vector]&]
|
||||
[s1;:noref:%- [@(0.0.255)3 template][3 _<][@(0.0.255)3 class][3 _][*@4;3 K][3 ,
|
||||
][@(0.0.255)3 class][3 _][*@4;3 T][3 , ][@(0.0.255)3 class][3 _][*@4;3 HashFn][3 _`=_StdHash][@(0.0.255)3 <
|
||||
][*@4;3 K][@(0.0.255)3 >][3 _>]&]
|
||||
|
|
@ -17,7 +18,7 @@ topic "VectorMap";
|
|||
oveableAndDeepCopyOption][@(0.0.255) <][* VectorMap][@(0.0.255) <][*@4 K],
|
||||
[*@4 T], [*@4 HashFn][@(0.0.255) >]_>, [@(0.0.255) public]_[*_^AMap^@3 AMap][@(0.0.255) <]_[*@4 K
|
||||
], [*@4 T], [_^Vector^ Vector][@(0.0.255) <][*@4 T][@(0.0.255) >], [*@4 HashFn]_>_&]
|
||||
[s5;%- &]
|
||||
[s0;%- &]
|
||||
[s8; [*@4 K]-|Type of keys. K must have deep copy constructor, be [/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
|
||||
oveable] and must have operator`=`= defined.&]
|
||||
[s8; [*@4 T]-|Type of elements stored in Vector. T is required to be
|
||||
|
|
@ -34,48 +35,56 @@ specific for its flavor.&]
|
|||
[s9; Like any other NTL container, VectorMap is [*/^topic`:`/`/Core`/srcdoc`/Moveable`$en`-us^ m
|
||||
oveable][*/ ]type with [*/^topic`:`/`/Core`/srcdoc`/pick`_`$en`-us^ pick
|
||||
and optional deep copy] transfer semantics. Calling methods of
|
||||
picked VectorMap is logic error with exception of&]
|
||||
[s0; [C+75 void ][*C+75 operator`=][C+75 (pick`_ VectorMap`& ][*C@3+75 v][C+75 )
|
||||
][/+75 (defined by composition)]&]
|
||||
[s0; [C+75 void ][*C+75 operator<<`=][C+75 (const AMap`& ][*C@3+75 v][C+75 )][+75
|
||||
][/+75 (defined in AMap)]&]
|
||||
[s0; [C+75 void ][*C+75 Clear][C+75 ()]&]
|
||||
[s0; [C+75 bool ][*C+75 IsPicked][C+75 () const]&]
|
||||
picked VectorMap is logic error with exception of:&]
|
||||
[s9;C+75 &]
|
||||
[s0; [*C+75 void operator`=(pick`_ VectorMap`& ][*C@3+75 v][*C+75 ) ][*/C+75 (defined
|
||||
by composition)]&]
|
||||
[s0; [*C+75 void operator<<`=(const AMap`& ][*C@3+75 v][*C+75 ) ][*/C+75 (defined
|
||||
in AMap)]&]
|
||||
[s0; [*C+75 void Clear()]&]
|
||||
[s0; [*C+75 bool IsPicked() const]&]
|
||||
[s0;C+75 &]
|
||||
[s9; Optional deep copy operator is inherited from AMap class. Pick
|
||||
operator is implicitly defined by composition.&]
|
||||
[s0;3%- &]
|
||||
[ {{10000t/25b/25@1 [s0;%- [* Public Member List]]}}&]
|
||||
[s0; &]
|
||||
[s5;:VectorMap`:`:Pop`(`):%- [*@4 T]_[* Pop]()&]
|
||||
[s2; Drops last element of VectorMap and returns its value.&]
|
||||
[s7; [*/ Return value]-|Value of dropped element.&]
|
||||
[s3;%- &]
|
||||
[s1; &]
|
||||
[ {{10000F(128)G(128)@1 [s0; [* Constructor Detail]]}}&]
|
||||
[s0;%- &]
|
||||
[s5;:VectorMap`:`:VectorMap`(`):%- [* VectorMap]()&]
|
||||
[s2; Default constructor. Constructs empty [* VectorMap].&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:VectorMap`:`:VectorMap`(const VectorMap`&`,int`):%- [* VectorMap]([@(0.0.255) const]_
|
||||
[* VectorMap][@(0.0.255) `&]_[*@3 s], [@(0.0.255) int])&]
|
||||
[s2; Optional deep copy constructor.&]
|
||||
[s2; [*1 Requires T to have deep copy constructor or optional deep
|
||||
copy constructor.]&]
|
||||
[s7; [*C@3 s]-|Source VectorMap.&]
|
||||
[s0;:`:`:VectorMap`:`:VectorMap`(pick`_`:`:Index`<K`,HashFn`>`&`,pick`_`:`:Vector`<T`>`&`): [* V
|
||||
ectorMap](pick`_ Index<K>`& [*@3 ndx], pick`_ Vector<T>`& [*@3 val])&]
|
||||
[s2; Pick`-constructs VectorMap from Index of keys and Vector of
|
||||
values. Both source containers should have the same number of
|
||||
elements.&]
|
||||
[s7; [*C@3 ndx]-|Source Index.&]
|
||||
[s7; [*C@3 val]-|Source Vector.&]
|
||||
[s3;%- &]
|
||||
[s6; Requires T to have deep copy constructor or optional deep copy
|
||||
constructor.&]
|
||||
[s7; [%-*@3 s][%- -|]Source [* VectorMap].&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:VectorMap`:`:VectorMap`(pick`_ Index`<K`,HashFn`>`&`,pick`_ Vector`<T`>`&`):%- [* V
|
||||
ectorMap]([@(0.128.128) pick`_]_[_^Index^ Index][@(0.0.255) <][*@4 K],
|
||||
[*@4 HashFn][@(0.0.255) >`&]_[*@3 ndx], [@(0.128.128) pick`_]_[_^Vector^ Vector][@(0.0.255) <
|
||||
][*@4 T][@(0.0.255) >`&]_[*@3 val])&]
|
||||
[s2; Pick`-constructs [* VectorMap] from [* Index] of keys and [* Vector]
|
||||
of values. Both source containers should have the same number
|
||||
of elements.&]
|
||||
[s7; [%-*@3 ndx][%- -|]Source Index.&]
|
||||
[s7; [%-*@3 val][%- -|]Source Vector.&]
|
||||
[s3; &]
|
||||
[s4;%- &]
|
||||
[s5;:VectorMap`:`:VectorMap`(pick`_ Vector`<K`>`&`,pick`_ Vector`<T`>`&`):%- [* VectorM
|
||||
ap]([@(0.128.128) pick`_]_[_^Vector^ Vector][@(0.0.255) <][*@4 K][@(0.0.255) >`&]_[*@3 ndx],
|
||||
[@(0.128.128) pick`_]_[_^Vector^ Vector][@(0.0.255) <][*@4 T][@(0.0.255) >`&]_[*@3 val])&]
|
||||
[s2; Pick`-constructs VectorMap from Vector of keys and Vector of
|
||||
values. Both source containers should have the same number of
|
||||
elements.&]
|
||||
[s7; [*C@3 ndx]-|Source Vector of keys.&]
|
||||
[s7; [*C@3 val]-|Source Vector of values.&]
|
||||
[s3;%- &]
|
||||
[s4;%- &]
|
||||
[s5;:VectorMap`:`:VectorMap`(`):%- [* VectorMap]()&]
|
||||
[s2; Default constructor. Constructs empty VectorMap.&]
|
||||
[s2; Pick`-constructs [* VectorMap] from [* Vector] of keys and [* Vector]
|
||||
of values. Both source containers should have the same number
|
||||
of elements.&]
|
||||
[s7; [%-*@3 ndx][%- -|]Source Vector of keys.&]
|
||||
[s7; [%-*@3 val][%- -|]Source Vector of values.&]
|
||||
[s1; &]
|
||||
[ {{10000F(128)G(128)t/25b/25@1 [s0;%- [* Public Member List]]}}&]
|
||||
[s0;%- &]
|
||||
[s5;:VectorMap`:`:Pop`(`):%- [*@4 T]_[* Pop]()&]
|
||||
[s2; Drops last element of VectorMap and returns its value.&]
|
||||
[s7; [*/ Return value]-|Value of dropped element.&]
|
||||
[s1; &]
|
||||
[s0; ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue