10 PRINT "TEXT EDITOR"
20 OPEN "FILE.TXT" FOR OUTPUT AS 1
21 PRINT "TYPE :wq! TO SAVE+EXIT."
30 INPUT A$
31 IF A$=":wq!" THEN CLOSE 1:END
40 PRINT #1,A$
41 GOTO 30
Name:
Anonymous2008-02-05 0:26
(loop (print (eval (read))))
Name:
Anonymous2008-02-05 1:02
(loop
(read)
(format t "?~%"))
Behold, I have created mighty ed!
Name:
Anonymous2008-02-05 1:36
/*
* Notepad application
* Copyright (C) 1984-1995 Microsoft Inc.
*/
TCHAR chMerge;
HWND hwndNP = 0; /* handle to notepad parent window */
HWND hwndEdit = 0; /* handle to main text control item */
HANDLE hEdit; /* Handle to storage for edit item */
HWND hDlgFind = NULL; /* handle to modeless FindText window */
HANDLE hStdCursor; /* handle to arrow or beam cursor */
HANDLE hWaitCursor; /* handle to hour glass cursor */
HANDLE hInstanceNP; /* Module instance handle */
HANDLE hFont; /* handle to Unicode font */
LOGFONT FontStruct; /* font dialog structure */
INT iPointSize=120; /* current point size unit=1/10 pts */
TCHAR szFileName[MAX_PATH+1]; /* Current notepad filename */
TCHAR szSearch[CCHKEYMAX]; /* Search string */
TCHAR szReplace[CCHKEYMAX]; /* replace string */
BOOL fUntitled = TRUE; /* TRUE iff notepad has no title */
HMENU hSysMenuSetup; /* Save Away for disabled Minimize */
DWORD dwEmSetHandle = 0; /* Is EM_SETHANDLE in process? */
HANDLE hAccel; /* Handle to accelerator table */
BOOL fRunBySetup = FALSE; /* Did SlipUp WinExec us?? */
BOOL fWrap = 0; /* Flag for word wrap */
TCHAR szNotepad[] = TEXT("Notepad");/* Name of notepad window class */
BOOL fInSaveAsDlg = FALSE;
/* variables for the new File/Open, File/Saveas,Find Text and Print dialogs */
OPENFILENAME OFN; /* passed to the File Open/save APIs */
TCHAR szOpenFilterSpec[CCHFILTERMAX]; /* default open filter spec */
TCHAR szSaveFilterSpec[CCHFILTERMAX]; /* default save filter spec */
NP_FILETYPE g_ftOpenedAs=FT_UNKNOWN; /* current file was opened */
NP_FILETYPE g_ftSaveAs; /* current file was opened */
FINDREPLACE FR; /* Passed to FindText() */
PAGESETUPDLG g_PageSetupDlg;
UINT wFRMsg; /* message used in communicating */
/* with Find/Replace dialog */
DWORD dwCurrentSelectionStart = 0L; /* WM_ACTIVATEAPP selection pos */
DWORD dwCurrentSelectionEnd = 0L; /* WM_ACTIVATEAPP selection pos */
UINT wHlpMsg; /* message used in invoking help */
/* Strings loaded from resource file passed to LoadString at initialization time */
/* To add resource string:
* 1) create IDS_ macro definition in notepad.h
* 2) create string in resource file
* 3) create 'TCHAR*' variable directly below and in notepad.h file
* 4) add &variable to rgsz
* 5) increment CSTRINGS
*/
TCHAR *szDiskError =(TCHAR *)IDS_DISKERROR; /* Can't open File, check disk */
TCHAR *szFNF =(TCHAR *)IDS_FNF; /* File not found */
TCHAR *szFAE =(TCHAR *)IDS_FAE; /* File already exists */
TCHAR *szSCBC =(TCHAR *)IDS_SCBC; /* Save changes before closing? */
TCHAR *szUntitled =(TCHAR *)IDS_UNTITLED; /* untitled */
TCHAR *szCFS =(TCHAR *)IDS_CFS; /* Can't find string */
TCHAR *szErrSpace =(TCHAR *)IDS_ERRSPACE; /* Memory space exhausted */
TCHAR *szNpTitle =(TCHAR *)IDS_NOTEPAD; /* Notepad - */
TCHAR *szFTL =(TCHAR *)IDS_FTL; /* File too large for notepad */
TCHAR *szNN =(TCHAR *)IDS_NN; /* Notepad Note! */
TCHAR *szPDIE =(TCHAR *)IDS_PRINTDLGINIT; /* Print dialog init error */
TCHAR *szCP =(TCHAR *)IDS_CANTPRINT; /* Can't print */
TCHAR *szNVF =(TCHAR *)IDS_NVF; /* Not a valid filename. */
TCHAR *szCREATEERR =(TCHAR *)IDS_CREATEERR; /* cannot create file */
TCHAR *szNoWW =(TCHAR *)IDS_NOWW; /* Too much text to word wrap */
TCHAR *szMerge =(TCHAR *)IDS_MERGE1; /* search string for merge */
TCHAR *szHelpFile =(TCHAR *)IDS_HELPFILE; /* Name of helpfile. */
TCHAR *szBadMarg =(TCHAR *)IDS_BADMARG; /* Bad margins. */
TCHAR *szFileOpenFail =(TCHAR *)IDS_FILEOPENFAIL; /* Can't open File */
TCHAR *szAnsiText =(TCHAR *)IDS_ANSITEXT; /* File/Open ANSI filter spec. string */
TCHAR *szAllFiles =(TCHAR *)IDS_ALLFILES; /* File/Open Filter spec. string */
TCHAR *szOpenCaption = (TCHAR *)IDS_OPENCAPTION; /* caption for File/Open dlg */
TCHAR *szSaveCaption = (TCHAR *)IDS_SAVECAPTION; /* caption for File/Save dlg */
TCHAR *szCannotQuit = (TCHAR *)IDS_CANNOTQUIT; /* cannot quit during a WM_QUERYENDSESSION */
TCHAR *szLoadDrvFail = (TCHAR *)IDS_LOADDRVFAIL; /* LOADDRVFAIL from PrintDlg */
TCHAR *szErrUnicode =(TCHAR *)IDS_ERRUNICODE; /* Unicode character existence error */
TCHAR *szACCESSDENY = (TCHAR *)IDS_ACCESSDENY; /* Access denied on Open */
TCHAR *szFontTooBig = (TCHAR *)IDS_FONTTOOBIG; /* font too big or page too small */
TCHAR *szCommDlgErr = (TCHAR *)IDS_COMMDLGERR; /* common dialog error %x */
TCHAR *szCommDlgInitErr = (TCHAR *)IDS_COMMDLGINIT; /* common dialog error %x */
TCHAR *szLineError = (TCHAR*)IDS_LINEERROR; /* line number error */
TCHAR *szLineTooLarge = (TCHAR*)IDS_LINETOOLARGE;/* line number out of range */
There are four engineers traveling in a car -- a mechanical engineer,
a chemical engineer, an electrical engineer, and a computer engineer. The car breaks down.
"Sounds to me as if the pistons have seized. We'll have to strip
down the engine before we can get the car working again", says the
mechanical engineer.
"Well", says the chemical engineer, "it sounded to me as if the fuel
might be contaminated. I think we should clear out the fuel system."
"I thought it might be an grounding problem", says the electrical
engineer, "or maybe a faulty plug lead."
They all turn to the computer scientist, who up to then had said
nothing, and asked "Well, what do you think?"
"I put on my wizard robe and hat. My other car is a cdr." The computer scientist pulls out a cudder from his pocket, and shoves it down the throats of the engineers. "Take that, motherfuckers!!!!"