Category : Pascal Source Code
Archive   : TPCM9406.ZIP
Filename : CODE052.PAS

 
Output of file : CODE052.PAS contained in archive : TPCM9406.ZIP
{
>> How would you go about converting a string, like '1553234876234'
>> into an array of byte? The problem comes when the string is too
>> big to deal with as a variable. I'm hoping to work with 50+ digit
>> numbers, but I need to know how to input them.

Well, you can always convert each character of the string to a Byte
with Val:
}

var B : array[1..255] of Byte;
S : string;
I,N : integer;

for I := 1 to Length(S) do
Val(S[I],B[I],N);

{
That presumes you can validate/have validated that all characters in
the string are numeric digit characters, of course...

---
* Origin: Silver Xpress Mail System (1:114/124)
}


  3 Responses to “Category : Pascal Source Code
Archive   : TPCM9406.ZIP
Filename : CODE052.PAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/