Перевод "Expression evaluation"

Bram Moolenaar, “Expression evaluation”, public translation into Ukrainian from English More about this translation.

See also 30 similar translations

Another translations: into English, into Russian. Translate into another language.

Participants

Join Translated.by to translate! If you already have a Translated.by account, please sign in.
If you do not want to register an account, you can sign in with OpenID.
Pages: ← previous Ctrl next next untranslated

Expression evaluation

*eval.txt* For Vim version 7.2. Last change: 2008 Aug 09

VIM REFERENCE MANUAL by Bram Moolenaar

Expression evaluation *expression* *expr* *E15* *eval*

Using expressions is introduced in chapter 41 of the user manual |usr_41.txt|.

Note: Expression evaluation can be disabled at compile time. If this has been
done, the features in this document are not available. See |+eval| and
|no-eval-feature|.

1. Variables |variables|
1.1 Variable types
1.2 Function references |Funcref|
1.3 Lists |Lists|
1.4 Dictionaries |Dictionaries|
1.5 More about variables |more-variables|
2. Expression syntax |expression-syntax|
3. Internal variable |internal-variables|
4. Builtin Functions |functions|
5. Defining functions |user-functions|
6. Curly braces names |curly-braces-names|
7. Commands |expression-commands|
8. Exception handling |exception-handling|
9. Examples |eval-examples|
10. No +eval feature |no-eval-feature|
11. The sandbox |eval-sandbox|
12. Textlock |textlock|

{Vi does not have any of these commands}

==============================================================================
1. Variables *variables*

1.1 Variable types ~
*E712*
There are six types of variables:

Number A 32 bit signed number. |expr-number| *Number*
Examples: -123 0x10 0177

Float A floating point number. |floating-point-format| *Float*
{only when compiled with the |+float| feature}
Examples: 123.456 1.15e-6 -1.1e3

String A NUL terminated string of 8-bit unsigned characters (bytes).
|expr-string| Examples: "ab\txx\"--" 'x-z''a,c'

Funcref A reference to a function |Funcref|.
Example: function("strlen")

List An ordered sequence of items |List|.
Example: [1, 2, ['a', 'b']]

Dictionary An associative, unordered array: Each entry has a key and a
value. |Dictionary|
Example: {'blue': "#0000ff", 'red': "#ff0000"}

The Number and String types are converted automatically, depending on how they
are used.

Conversion from a Number to a String is by making the ASCII representation of
the Number. Examples: >
Number 123 --> String "123"
Number 0 --> String "0"
Number -1 --> String "-1"

Pages: ← previous Ctrl next next untranslated