if you end up with many copies of this, my apologies. fighting with the server trying to get it to send this -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 8:56 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Hello World! Programmer's progress High school student: 10 PRINT "HELLO WORLD" 20 END -------------------------------------------------------------- First year undergraduate: program Hello(input, output) begin writeln ( Hello World); end. -------------------------------------------------------------- Final year undergraduate: (defun hello (print (cons Hello (list World)))) -------------------------------------------------------------- New professional: #include void main(void) { char * message[] = { "Hello", "World"}; int i; for( i=0; i<2; ++i) printf("%s",message[i]); printf("\n"); } -------------------------------------------------------------- Seasoned professional: #include #include class string { private: int size: char *ptr; public: string():size(0), otr(new char(\0)){} string(const string &s):size(s.size) { ptr=new char[size + 1]; strcpy(ptr.s.ptr); } string() { delete[] ptr; } friend ostream &operator <<(ostream & const string &); string &operator= (const char *); }; ostream &operator <<(ostream & const string &); { return(stream<<s.ptr); } string &string::operator=(const char *chrs) { if (this != &chrs) {.. -------------------------------------------------------------- Master programmer: [ uuid(2573F3F4-CFEE-101A-9A9F-00AA00342820) ] library LHello { //bring in the master library importlib("actimp.tlb"); importlib("actexp.tlb"); //bring my interfaces #include "pshlo.idl" [ uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820) ] cotype THello { interface IHello; interface IPersisFile; }; }; [ exe. uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820) ] module CHelloLib { //some code related header files importheader(); importheader(); importheader(); importheader("pshlo.h"); importheader("shlo.hxx"); importheader("myCLS.hxx"); //needed typelibs importlib("actimp.tlb"); importlib("actexp.tlb"); importlib("thlo.tlb"); [ uuid(2573F8F5-CFEE-101A-9A9F-00AA00342820) aggregatable ] coclass CHello { cotype THello; }; }; #include "ipfix.hxx" extern HANDLE hEvent; class CHello: public CHelloBase { public: IPFIX(CLSID_CHello); CHello(IUnknown IpUnk); TChello(); HRESULT _stdcall PrintSz(LPWSTR pwszString); private: static int cObjRef; }; #include #include ULONG ulCnt; LMoniker * pmk; WCHAR wcsT[_MAX_PATH]; //get object path wcsPath[0]=\0; wcsT[0]=\0; if( argc:) ) mostowcs(wcsPath, argv[1], strlen(argv[1]) + 1); wcsupr(wcsPath); } else { fprintf(stderr, "Object path must be specified\n"); return(1); } //get print string if(argc 2) mostowcs(wcsT, argv[1], strlen(argv[1]) + 1); else wcscpy(wcsT,L,"Hello World"); printf("Linking to object %ws\n", wcsPath); printf("Text Striong %ws\n", wcsT); //Initialize the OLE libraries hRsit = CoInitializeEx(NULL,COINIT_MULTITHREADED); if(SUCCEEDED(hRsit)) { hRsit = CreateFileMoniker(wcsPath, &pmk); if(SUCCEEDED(hRsit)) hRsit= BindMoniker(pmk,0,IID_(Hello,(void**)&pHello); if(SUCCEEDED(hRsit)) //print a string out pHello->PrintSz(wcsT); Sleep(2000); uiCnt=oHello->Release(); } else printf("Failure to connect, status: %lx", hRsit); //Tell OLE we are going away CoUninitialize(); } return(0); } -------------------------------------------------------------- Apprentice hacker: #1/usr/local/bin/pert $msg="Hello World.\n"; if ($#ARGV>=0){ while(defined($arg=shift(@ARG))){ Soutfilename=Sarg; open(FILE,">",Soutfilename)||die "Can t write Sarg:$!\n"; print(FILE $msg); close(FILE)||Die "Can t close Sarg:$!\n"; } } else { print ($msg); } ]; -------------------------------------------------------------- Experienced hacker: #include #define S "Hello World\n" main()[exit(printf(S)==strlen(S)?0:1);} -------------------------------------------------------------- Seasoned hacker: % cc -o a.out~/src/misc/hw/hw.c % a.out -------------------------------------------------------------- Guru hacker: % cat Hello.world. D -------------------------------------------------------------- Ultra high level programmer: system.uhdl: SYSTEM CREATE ScreenWin SIZE 20000000/Unit-One DESTINATION Order.dest[One] OUTPUT CHARACTER[ Hello World ] END END -------------------------------------------------------------- New manager: 10 PRINT "HELLO WORLD" 20 END -------------------------------------------------------------- Middle manager: mail -s "Hello, World." bob@b12 Bob, could you please write me a program that prints "Hello, World."? I need it by tomorrow. D -------------------------------------------------------------- Senior manager: % zmail all I need a "Hello, world." program by this afternoon. -------------------------------------------------------------- Chief executive: % message message: Command not found % pm pm: Command not found % mail To: X F C help mail help: Command not found >what what: Command not found >need help need: Command not found damn! !: Event unrecognized >exit exit: Unknown >quit %logout Bipppp! Mrs Thomsson? Please Tommy for me. NOW!
<<attachment: winmail.dat>>