Help needed: program that prints out its source code when RUN 
Author Message
 Help needed: program that prints out its source code when RUN

Can some help me, please?
I am trying to write a program that prints out its own source code when
RUN. Any ideas or the source code???

----- Posted via Deja.com, The People-Powered Information Exchange -----
------ http://www.*-*-*.com/ ; Discussions * Ratings * Communities ------



Sat, 13 Oct 2001 03:00:00 GMT  
 Help needed: program that prints out its source code when RUN
Can some help me, please?
I am trying to write a program that prints out its own source code when
RUN. Any ideas or the source code???

----- Posted via Deja.com, The People-Powered Information Exchange -----
------ http://www.deja.com/   Discussions * Ratings * Communities ------



Sat, 13 Oct 2001 03:00:00 GMT  
 Help needed: program that prints out its source code when RUN


Quote:
> Can some help me, please?
> I am trying to write a program that prints out its own source code when
> RUN. Any ideas or the source code???

use C (see obfuscated C code contest), think #define.  or use a LISP dialect.
I don't think you'll find an Oberon program that prints itself out.  It's a
language that's not so demented.

    -- ben

--



Sat, 13 Oct 2001 03:00:00 GMT  
 Help needed: program that prints out its source code when RUN
Quote:

> Can some help me, please?
> I am trying to write a program that prints out its own source code when
> RUN. Any ideas or the source code???

I'm not sure I understand. Do you mean something like:

MODULE Source;
PROCEDURE Do;
BEGIN (* print Source.Mod to System.Log *) END Do;
END Source.

Regards, Edgar

--

*          DOSenfreie Zone.        Running Native Oberon.         *
Make it as simple as possible, but not simpler.     Albert Einstein



Sat, 13 Oct 2001 03:00:00 GMT  
 Help needed: program that prints out its source code when RUN
This has been on comp.lang.modula2 recently - you might try there or search deja
news.
Koen.
Quote:

>Can some help me, please?
>I am trying to write a program that prints out its own source code when
>RUN. Any ideas or the source code???

>----- Posted via Deja.com, The People-Powered Information Exchange -----
>------ http://www.deja.com/   Discussions * Ratings * Communities ------



Sun, 14 Oct 2001 03:00:00 GMT  
 Help needed: program that prints out its source code when RUN
The following program should be minimal in respect to the size of the generated
code. Please note that the module "M" must be unloaded from the memory to work
correctly.
Enjoy.

- Peter

----
MODULE M;

 IMPORT O:=Out;

 CONST
  T = ";PROCEDURE c*;BEGIN O.Char(22X);O.String(T) END c;BEGIN O.String('MODULE
M;IMPORT O:=Out;CONST T=');c END M.";

 PROCEDURE c*;
 BEGIN
  O.Char(22X);O.String(T)
 END c;

BEGIN
 O.String('MODULE M;IMPORT O:=Out;CONST T=');
 c
END M.

M.c

System.Free M~



Sun, 14 Oct 2001 03:00:00 GMT  
 Help needed: program that prints out its source code when RUN


Quote:
> The following program should be minimal in respect to the size of the
generated
> code. Please note that the module "M" must be unloaded from the memory to work
> correctly.
> Enjoy.

> - Peter

> ----
> MODULE M;

>  IMPORT O:=Out;

>  CONST
>   T = ";PROCEDURE c*;BEGIN O.Char(22X);O.String(T) END c;BEGIN
O.String('MODULE
> M;IMPORT O:=Out;CONST T=');c END M.";

>  PROCEDURE c*;
>  BEGIN
>   O.Char(22X);O.String(T)
>  END c;

> BEGIN
>  O.String('MODULE M;IMPORT O:=Out;CONST T=');
>  c
> END M.

> M.c

> System.Free M~

I stand corrected.  Truly demented.  I'm impressed. :)

--



Sun, 14 Oct 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. we need an source cobol program for printing code-bar

2. print program source code

3. print program source code

4. Help - I need Example of Code to Help Print National Characters

5. Help with Printing Source Code

6. We need your help to find some links, documents, sources codes and with the EMAg

7. Help needed: looking for source code of CA...

8. HELP: Need Mastermind source code

9. Need help with my source code

10. File transfer source code needed urgently. Please help

11. Help needed with MARS source code

12. NEED HELP: ASM Floating Point Math Source Code

 

 
Powered by phpBB® Forum Software