« previous entry | next entry »
Maijs. 2., 2006 | 09:12 pm
posted by: phoenix in pajautaa
Jautaajums:
Vai var noteikt no faila nolasītā simbola datu tipu - vai tas ir char vai int?
ja var, tad kā? c++ vide
Iz vestures:
esmu jau meeghinajausi iztikt bez shiis paarbudes, bet nu nekaadiigi taa lieta nekust uz priekshu! man vaig no faila, kuraa katraa rindinjaa atrodas vai nu burti, vai integeri, saskaitiit kopeejo summu katras rindinjas cipariem (ja taa ir rindinja, kuraa atrodas skaitlji). Rindinjaa, kuraa ir burti, neko nevaig dariit.
A es maaku tikai nolasiit simbolus un tos ielasiit mainiigajaa, kuram jau ieprieksh esmu pateikusi, vai tas ir int, vai char. A taa kaa nezinu, kaada datu tipa simbols no faila tiks nolasiits, nevaru izveeleeties tā mainiigā datu tipu, kuraa tiks saglabaata nolasiitaa veertiiba!
Vai var noteikt no faila nolasītā simbola datu tipu - vai tas ir char vai int?
ja var, tad kā? c++ vide
Iz vestures:
esmu jau meeghinajausi iztikt bez shiis paarbudes, bet nu nekaadiigi taa lieta nekust uz priekshu! man vaig no faila, kuraa katraa rindinjaa atrodas vai nu burti, vai integeri, saskaitiit kopeejo summu katras rindinjas cipariem (ja taa ir rindinja, kuraa atrodas skaitlji). Rindinjaa, kuraa ir burti, neko nevaig dariit.
A es maaku tikai nolasiit simbolus un tos ielasiit mainiigajaa, kuram jau ieprieksh esmu pateikusi, vai tas ir int, vai char. A taa kaa nezinu, kaada datu tipa simbols no faila tiks nolasiits, nevaru izveeleeties tā mainiigā datu tipu, kuraa tiks saglabaata nolasiitaa veertiiba!
from: laumina
date: Maijs. 2., 2006 - 09:30 pm
#
No skaitlja paarveerst simbolu virknee
Nu parasti .. es nez Delphos laikam bija funkcija STR
No simboliem uz int...
eh
Blin.. programmee a ne F1 ne googli nepaziist.
iz Excelja VB Helpa
Val Function
Returns the numbers contained in a string as a numeric value of appropriate type.
Syntax
Val(string)
The required string argument is any valid string expression.
Remarks
The Val function stops reading the string at the first character it can't recognize as part of a number. Symbols and characters that are often considered parts of numeric values, such as dollar signs and commas, are not recognized. However, the function recognizes the radix prefixes &O (for octal) and &H (for hexadecimal). Blanks, tabs, and linefeed characters are stripped from the argument.
The following returns the value 1615198:
Val(" 1615 198th Street N.E.")
In the code below, Val returns the decimal value -1 for the hexadecimal value shown:
Val("&HFFFF")
Note The Val function recognizes only the period (.) as a valid decimal separator. When different decimal separators are used, as in international applications, use CDbl instead to convert a string to a number.
Returns a Variant (String) representation of a number.
Syntax
Str(number)
The required number argument is a Long containing any valid numeric expression.
Remarks
When numbers are converted to strings, a leading space is always reserved for the sign of number. If number is positive, the returned string contains a leading space and the plus sign is implied.
Use the Format function to convert numeric values you want formatted as dates, times, or currency or in other user-defined formats. Unlike Str, the Format function doesn't include a leading space for the sign of number.
Note The Str function recognizes only the period (.) as a valid decimal separator. When different decimal separators may be used (for example, in international applications), use CStr to convert a number to a string.
Atbildēt | Iepriekšējais | Diskusija
from: phoenix
date: Maijs. 2., 2006 - 09:38 pm
#
ne gribu, ne interesee, bet vajag
un par tiem f1 un googleem - ja nezinu, ko mekleet (lasiit: saprotami un iisi nodefineet, ko mekleet vajag), tad shie resursi nekaa nepaliidz.
Atbildēt | Iepriekšējais