|
Pascal
|
|||
---|---|---|---|
#18+
Privet wsem! Moget kto znaet, kak perevesti string v integer w Pascale ili xotja bi kak rabotaet funktija Val? ... |
|||
:
Нравится:
Не нравится:
|
|||
27.10.2002, 13:17 |
|
Pascal
|
|||
---|---|---|---|
#18+
Код: plaintext 1. 2. 3.
Code - simvol, na kotorom voznikla oshibka (esli stroka sogerzit nechislovie simvoli) Esli ti v Dephi, to tam est takaya functia StrToInt(s: string): integer preobrazuet stroky v celoe chislo, esli ne ono ne preobrazuetsa - generit Exception Help po val is Dephi: Converts a string to a numeric representation. Unit System Category string handling routines procedure Val(S; var V; var Code: Integer); Description Val converts the string value S to its numeric representation, as if it were read from a text file with Read. S is a string-type expression; it must be a sequence of characters that form a signed real number. V is an integer-type or real-type variable. If V is an integer-type variable, S must form a whole number. Code is a variable of type Integer. If the string is invalid, the index of the offending character is stored in Code; otherwise, Code is set to zero. For a null-terminated string, the error position returned in Code is one larger than the actual zero-based index of the character in error. Val performs range checking differently depending upon the setting of the $R compiler directive and the type of the parameter V. ... |
|||
:
Нравится:
Не нравится:
|
|||
28.10.2002, 10:45 |
|
|
start [/forum/topic.php?fid=16&fpage=236&tid=1348993]: |
0ms |
get settings: |
11ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
32ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
45ms |
get tp. blocked users: |
2ms |
others: | 13ms |
total: | 140ms |
0 / 0 |