@@ -317,145 +317,6 @@ class Sequence(Builtin):
317317 """
318318
319319
320- class Line (Builtin ):
321- """
322- <dl>
323- <dt>'$Line'
324- <dd>holds the current input line number.
325- </dl>
326- >> $Line
327- = 1
328- >> $Line
329- = 2
330- >> $Line = 12;
331- >> 2 * 5
332- = 10
333- >> Out[13]
334- = 10
335- >> $Line = -1;
336- : Non-negative integer expected.
337- """
338-
339- name = "$Line"
340-
341-
342- class HistoryLength (Builtin ):
343- """
344- <dl>
345- <dt>'$HistoryLength'
346- <dd>specifies the maximum number of 'In' and 'Out' entries.
347- </dl>
348- >> $HistoryLength
349- = 100
350- >> $HistoryLength = 1;
351- >> 42
352- = 42
353- >> %
354- = 42
355- >> %%
356- = %3
357- >> $HistoryLength = 0;
358- >> 42
359- = 42
360- >> %
361- = %7
362- """
363-
364- name = "$HistoryLength"
365-
366- rules = {
367- "$HistoryLength" : "100" ,
368- }
369-
370-
371- class In (Builtin ):
372- """
373- <dl>
374- <dt>'In[$k$]'
375- <dd>gives the $k$th line of input.
376- </dl>
377- >> x = 1
378- = 1
379- >> x = x + 1
380- = 2
381- >> Do[In[2], {3}]
382- >> x
383- = 5
384- >> In[-1]
385- = 5
386- >> Definition[In]
387- = Attributes[In] = {Listable, Protected}
388- .
389- . In[6] = Definition[In]
390- .
391- . In[5] = In[-1]
392- .
393- . In[4] = x
394- .
395- . In[3] = Do[In[2], {3}]
396- .
397- . In[2] = x = x + 1
398- .
399- . In[1] = x = 1
400- """
401-
402- attributes = ("Listable" , "Protected" )
403-
404- rules = {
405- "In[k_Integer?Negative]" : "In[$Line + k]" ,
406- }
407-
408-
409- class Out (Builtin ):
410- """
411- <dl>
412- <dt>'Out[$k$]'
413- <dt>'%$k$'
414- <dd>gives the result of the $k$th input line.
415- <dt>'%', '%%', etc.
416- <dd>gives the result of the previous input line, of the line before the previous input line, etc.
417- </dl>
418-
419- >> 42
420- = 42
421- >> %
422- = 42
423- >> 43;
424- >> %
425- = 43
426- >> 44
427- = 44
428- >> %1
429- = 42
430- >> %%
431- = 44
432- >> Hold[Out[-1]]
433- = Hold[%]
434- >> Hold[%4]
435- = Hold[%4]
436- >> Out[0]
437- = Out[0]
438-
439- #> 10
440- = 10
441- #> Out[-1] + 1
442- = 11
443- #> Out[] + 1
444- = 12
445- """
446-
447- attributes = ("Listable" , "Protected" )
448-
449- rules = {
450- "Out[k_Integer?Negative]" : "Out[$Line + k]" ,
451- "Out[]" : "Out[$Line - 1]" ,
452- "MakeBoxes[Out[k_Integer?((-10 <= # < 0)&)],"
453- " f:StandardForm|TraditionalForm|InputForm|OutputForm]" : r'StringJoin[ConstantArray["%%", -k]]' ,
454- "MakeBoxes[Out[k_Integer?Positive],"
455- " f:StandardForm|TraditionalForm|InputForm|OutputForm]" : r'"%%" <> ToString[k]' ,
456- }
457-
458-
459320class Quit (Builtin ):
460321 """
461322 <dl>
0 commit comments