🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.sources.wanted
3 messages
3 total messages Started by John Stoeckmann Fri, 17 Mar 1995 21:31
Dez to Bin How to in TurboPascal
#1130
Author: John Stoeckmann
Date: Fri, 17 Mar 1995 21:31
19 lines
1708 bytes
Hello everybody,

Can anyone tell how I can change decimal numbers into binary in Turbopascal
like e.g:

                               255 in 11111111.

Did not find anything in the manual.

Ciao, Johnny



--
          _
:-X  _   // John St�ckmann    Telefon: +++49 (0)9273 8459   Fax receiving on demand
:-{) \\ // Rotherstra�e 43    eMail: jst@atremo.franken.de  PGPV2.6ui key on Request
(-:   \X/ D-95460 Bad Berneck Germany 50�02'59"N 11�40'26"E DxJ-Mail: 092738459-0001
Re: Dez to Bin How to in TurboPascal
#1129
Author: MAITERTH ANDREAS
Date: Mon, 20 Mar 1995 13:47
28 lines
2146 bytes
In article <39279346@atremo.franken.de> "John Stoeckmann" <jst@atremo.franken.de> writes:

>Can anyone tell how I can change decimal numbers into binary in Turbopascal
>like e.g:

>                               255 in 11111111.
Teil doch die Zahl einfach immer durch 2 und wenn der Rest 1 ist, dann schreib 
eine 1, sonst eine 0. So einfach ist das

>Did not find anything in the manual.
Mu� f�r dich jede Funktion vordefiniert sein?

Andreas



>--
>          _
>:-X  _   // John St�ckmann    Telefon: +++49 (0)9273 8459   Fax receiving on demand
>:-{) \\ // Rotherstra�e 43    eMail: jst@atremo.franken.de  PGPV2.6ui key on Request
>(-:   \X/ D-95460 Bad Berneck Germany 50�02'59"N 11�40'26"E DxJ-Mail: 092738459-0001



###################
Maiterth Andreas        *
Leo-Pam-Str. 25/303  *
94032 Passau           *
Re: Dez to Bin How to in TurboPascal
#1128
Author: Hauke Zuehl
Date: Wed, 22 Mar 1995 16:09
44 lines
2314 bytes
John Stoeckmann (jst@atremo.franken.de) wrote:

: Hello everybody,

: Can anyone tell how I can change decimal numbers into binary in Turbopascal
: like e.g:

:                                255 in 11111111.

: Did not find anything in the manual.

: Ciao, Johnny

Hi Johnny!

A simple solution is:

Write a function which calculates it:

Like :
Function Dec2Bin(decimal : Integer) : String;

The algorithm should be clear :)

--

Yours

Hauke

============================================================================

               Gut, dass wir Elektrizitaet haben, denn
               sonst wuerden wir im Dunkeln vor unseren
               Computern sitzen!

		
Hauke Zuehl
EMail : zuehl@uni-paderborn.de
VMail : +49 +5258 21881

Meet me in PaderMUD via mud.uni-paderborn.de 3000, too :)
MUDname : Sancho
============================================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads