1
0
mirror of synced 2026-01-24 19:51:16 +00:00
2021-01-22 15:26:25 -08:00

3 lines
3.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><title>09-FLEXIBILITY</title><link href="navigation.css" rel="stylesheet" type="text/css"/><link href="document.css" rel="stylesheet" type="text/css"/></head><body><p class="top_nav"><a href="part11.htm">&lt; Previous</a><span> | </span><a href="../Medley-Primer.html">Contents</a><span> | </span><a href="part13.htm">Next &gt;</a></p><h1 style="padding-top: 3pt;padding-left: 35pt;text-indent: 0pt;text-align: left;"><a name="bookmark11">9. MEDLEY FORGIVENESS: DWIM</a></h1><p style="padding-left: 35pt;text-indent: 0pt;line-height: 6pt;text-align: left;"><span><img width="640" height="8" alt="image" src="Image_069.png"/></span></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p class="s3" style="padding-top: 15pt;padding-left: 107pt;text-indent: 0pt;text-align: left;">DWIM <span class="p">(Do What I Mean) is an Interlisp utility that makes life easier.</span></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p class="s3" style="padding-left: 107pt;text-indent: 0pt;line-height: 107%;text-align: left;">DWIM <span class="p">tries to match unrecognized variable and function names to known ones. This allows Lisp to interpret minor typing errors or misspellings in a function, without</span></p><p style="padding-left: 107pt;text-indent: 0pt;line-height: 107%;text-align: left;">causing a break. Line 152 of Figure 9-1 illustrates how the misspelled <span class="s3">BANNANNA </span>was replaced by <span class="s3">BANANA </span>before the expression was evaluated.</p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 144pt;text-indent: 0pt;text-align: left;"><span><img width="445" height="193" alt="image" src="Image_070.gif"/></span></p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 219pt;text-indent: 0pt;text-align: left;">Figure 9-1. Examples of <span class="s3">DWIM </span>Features</p><p style="text-indent: 0pt;text-align: left;"><br/></p><p style="padding-left: 107pt;text-indent: 0pt;text-align: left;">Sometimes <span class="s3">DWIM </span>may alter an expression you didnt want it to. This may occur if, for</p><p style="padding-left: 107pt;text-indent: 0pt;line-height: 106%;text-align: left;">example, a hyphenated function name (e.g., <span class="s3">(MY-FUNCTION) </span>) is misused. If the system does not recognize the function name, it may think you are trying to subtract &quot;<span class="s3">FUNCTION</span>&quot; from &quot;<span class="s3">MY</span>&quot;. <span class="s3">DWIM </span>also takes the liberty of updating the function, so it will</p><p style="padding-left: 107pt;text-indent: 0pt;text-align: left;">have to be fixed. However, this is as much a blessing as a curse, since it points out the misused expression!</p><p class="nav">&nbsp;&nbsp;</p><p class="nav">&nbsp;</p><p class="nav"><a href="part11.htm">&lt; Previous</a><span> | </span><a href="../Medley-Primer.html">Contents</a><span> | </span><a href="part13.htm">Next &gt;</a></p><p class="nav">&nbsp;&nbsp;</p></body></html>