Jul 9, 2015 10:01
8 yrs ago
2 viewers *
English term

convert to long

English to Romanian Other Computers: Software
How could I convert data from string to long?
Proposed translations (Romanian)
5 +2 conversie la valoare long

Discussion

meirs Jul 9, 2015:
long data type in the particular programming language (long integer = 32 bits on a 16 bit machine)
other data types are short (integer), unsigned (integer), float(ing point number), and string (of course)etc.
Janos Fazakas Jul 9, 2015:
Text lung Cred că se referă la convertirea de la setul de instrucții în limbaj comun, inteligibil pentru utilizatorul de rând. Așa cred.

Proposed translations

+2
1 hr
Selected

conversie la valoare long

Avand ca data de intrare un sir de caractere , de exemplu ASCII, adica pe 2 octeti, se vrea conversia acestui sir de caractere ASCII la echivalentul lor ca valoare intreaga, pe 4 bytes sau pe 8 bytes.

Se presupune ca sirul de caractere care se vrea trasnformat contine doar caracterele ASCII corespunzatoare cifrelor zecimale adica de la '0' la '9'. Eventual semnul '-' , pentru valori negative.

De exemplu daca avem string-ul "123" acesta se vrea convertit la 123.


Dar pentru un string precum "abc34de" se va lansa o exceptie / returna o eroare.

Functia de conversie va trebui de asemenea sa faca o verificare a domeniului de valori. De exmeplu pentru un string precum : "89564342342341231231322127777"
va da o exceptie, valoarea numerica neputand fi reprezentata pe 4 sau pe 8 octeti (bytes).

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:43:36 GMT)
--------------------------------------------------

http://www.cplusplus.com/reference/cstdlib/atol/

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:44:50 GMT)
--------------------------------------------------

http://gsp.com/cgi-bin/man.cgi?section=3&topic=atol

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:45:06 GMT)
--------------------------------------------------

http://stackoverflow.com/questions/7370887/convert-an-ascii-...

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:45:28 GMT)
--------------------------------------------------

http://www.asciitable.com/

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:46:20 GMT)
--------------------------------------------------

https://msdn.microsoft.com/en-us/library/aa272023(v=vs.60).a...

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:48:22 GMT)
--------------------------------------------------

https://leetcode.com/problems/string-to-integer-atoi/

--------------------------------------------------
Note added at 3 hrs (2015-07-09 13:49:00 GMT)
--------------------------------------------------

https://leetcode.com/discuss/questions/oj/string-to-integer-...
Peer comment(s):

agree meirs : Makes sense
2 hrs
multumesc!
agree Iosif JUHASZ
19 hrs
multumesc!
Something went wrong...
4 KudoZ points awarded for this answer.
Term search
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search