TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: R.WIESER
from: PASCAL J. BOURGUIGNON
date: 2019-02-25 10:13:00
subject: Re: C is not a low level

"R.Wieser"  writes:

> Pascal,
>
>> In case you didn't notice, the terminating null is not stored
>
> Really ?    Good luck with "printf" -ing such a non-terminated string than.
> :-)
>
>> or transmitted to external devices.
>
> Wrong.    See below.
>
>> When you display the string on a screen, print it in a printer, transmit
>> it to
>> a remote terminal, etc, the null byte should not be displayed, printed
>
> While you are right there, seeing it or not is a whole other matter.
>
>> transmitted.
>
> Good luck with determining where one string ends and the next one starts I
> would say. :-)
>
> And by the way: The "nul" character was used as a short delay for the, long
> ago, mechanical(!) teletypes (no handshaking, no hold-off or buffering
> facilities) as a short delay - so that the stream of send characters could
> be continuous but the TTY had a chance to actually return is carriage and
> progres a line before type the next actual character.
>
> And yes, once upon a time I had such a device. :-)

Indeed, null introduced a delay, due to the time needed to transmit it.
But it was entirely ignored (had to be), by the receiving device.

To separate your strings, you would use the US (Unit Separator) ASCII
code, or transmit a binary length first.


--
__Pascal J. Bourguignon__
http://www.informatimago.com

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.