Deutsch   English   Français   Italiano  
<eeca502210e0692c317347c3aca2e109866d6026@i2pn2.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail
From: John Reagan <johnrreagan@earthlink.net>
Newsgroups: comp.os.vms
Subject: Re: Fun trick
Date: Mon, 13 Jan 2025 21:11:29 -0500
Organization: i2pn2 (i2pn.org)
Message-ID: <eeca502210e0692c317347c3aca2e109866d6026@i2pn2.org>
References: <vlkm45$2fe4n$1@dont-email.me> <vlmt72$2vndn$1@dont-email.me>
 <vlmto2$2v5n1$2@dont-email.me> <vlmub7$2vndn$2@dont-email.me>
 <vln74b$318c0$3@dont-email.me> <vlohc5$3cc83$1@dont-email.me>
 <67855f5f$0$714$14726298@news.sunsite.dk> <vm43g7$225rp$1@dont-email.me>
 <vm45lv$22lsd$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 14 Jan 2025 02:11:29 -0000 (UTC)
Injection-Info: i2pn2.org;
	logging-data="3496715"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="85Cwws6+ypgQVu4foqgE6eSuYb0IIJZq6Fz6j0v4a/s";
User-Agent: Mozilla Thunderbird
X-Spam-Checker-Version: SpamAssassin 4.0.0
In-Reply-To: <vm45lv$22lsd$1@dont-email.me>
Content-Language: en-US
Bytes: 2123
Lines: 33

On 1/13/2025 5:55 PM, Arne Vajhøj wrote:
> On 1/13/2025 5:18 PM, Lawrence D'Oliveiro wrote:
>> On Mon, 13 Jan 2025 13:45:50 -0500, Arne Vajhøj wrote:
>>> There are probably a lot of shareable images written in C out there
>>> where the developer has no idea that they are runnable or what code will
>>> run.
>>
>> If it has no main(), then nothing will run.
> 
> That is what the developer thinks.
> 
> But it is not so.
> 
> $ type lawrence.c
> #include <stdio.h>
> 
> int foobar()
> {
>      printf("Hi Lawrence\n");
>      return 1;
> }
> $ cc lawrence
> $ link/share  lawrence
> $ run lawrence
> Hi Lawrence
> 
> No main() and it runs anyway.
> 
> Arne
> 
COBOL paragraphs behave like C.  First routine/PARAGRAPH gets a WEAK 
transfer address.  Linker finds the first one.  Shuffle modules around 
and you'll get different transfer addresses.  Pascal just creates a 
STRONG transfer address for a PROGRAM statement.