Changeset 2040

Show
Ignore:
Timestamp:
09/19/10 02:11:27 (2 years ago)
Author:
walter
Message:

typography

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docsrc/abi.dd

    r1416 r2040  
    703703    On Linux, a real is pushed as a 12 byte quantity, 
    704704    a creal is pushed as two 12 byte quantities. 
    705     The extra two bytes of pad occupy the 'most significant' position. 
     705    The extra two bytes of pad occupy the $(SINGLEQUOTE most significant) position. 
    706706    ) 
    707707 
     
    10461046    $(TD DW_TAG_delegate_type) 
    10471047    $(TD 0x43) 
    1048     $(TD DW_AT_type, is function type, DW_AT_containing_type is 'this' type) 
     1048    $(TD DW_AT_type, is function type, DW_AT_containing_type is $(SINGLEQUOTE this) type) 
    10491049    ) 
    10501050    ) 
  • trunk/docsrc/attribute.dd

    r1404 r2040  
    263263    function, 
    264264    that member can only be accessed for the object instance 
    265     which is the 'this' object for the member function call. 
     265    which is the $(SINGLEQUOTE this) object for the member function call. 
    266266    Protected module members are illegal. 
    267267    ) 
     
    533533    Functions declared as abstract can still have function 
    534534    bodies. This is so that even though they must be overridden, 
    535     they can still provide 'base class functionality.' 
     535    they can still provide $(SINGLEQUOTE base class functionality.) 
    536536) 
    537537 
  • trunk/docsrc/const.dd

    r747 r2040  
    355355But const cannot be implicitly converted to invariant, and neither can 
    356356mutable references. 
    357 Essentially, const is a weaker form of invariant because it says: "you can't 
    358 change this data; someone else may or may not be able to change it." 
     357Essentially, const is a weaker form of invariant because it says: $(DOUBLEQUOTE you can't 
     358change this data; someone else may or may not be able to change it.) 
    359359) 
    360360 
  • trunk/docsrc/cppcomplex.dd

    r659 r2040  
    3737) 
    3838 
    39     In D, an imaginary numeric literal has the 'i' suffix. 
     39    In D, an imaginary numeric literal has the $(SINGLEQUOTE i) suffix. 
    4040    The corresponding code would be the more natural: 
    4141 
     
    187187    <p> 
    188188 
    189     "Branch Cuts for Complex Elementary Functions, 
    190     or Much Ado About Nothing's Sign Bit"  
     189    $(DOUBLEQUOTE Branch Cuts for Complex Elementary Functions, 
     190    or Much Ado About Nothing's Sign Bit)  
    191191    by W. Kahan, ch.<br> 
    192192    7 in The State of the Art in Numerical Analysis (1987) 
  • trunk/docsrc/cppstrings.dd

    r880 r2040  
    1616    it's not adding strings but concatenating them. 
    1717) 
    18 $(P Additionally, if one has an array of floats, is '+' overloaded to 
     18$(P Additionally, if one has an array of floats, is $(SINGLEQUOTE +) overloaded to 
    1919    be the same as a vector addition, or an array concatenation? 
    2020) 
     
    261261    This, coupled with no garbage collection, has 
    262262    some consequences. First of all, any string created must make 
    263     its own copy of the string data. The 'owner' of the string 
     263    its own copy of the string data. The $(SINGLEQUOTE owner) of the string 
    264264    data must be kept track of, because when the owner is deleted 
    265265    all references become invalid. If one tries to avoid the 
     
    277277    string data. D strings can refer to data in the static data 
    278278    segment, data on the stack, data inside other strings, objects, 
    279     file buffers, etc. There's no need to keep track of the 'owner' 
     279    file buffers, etc. There's no need to keep track of the $(SINGLEQUOTE owner) 
    280280    of the string data. 
    281281) 
  • trunk/docsrc/cpptod.dd

    r659 r2040  
    163163 
    164164    There's a nasty bug lurking in the memcmp() implementation of operator==(). 
    165     The layout of a struct, due to alignment, can have 'holes' in it. 
     165    The layout of a struct, due to alignment, can have $(SINGLEQUOTE holes) in it. 
    166166    C++ does not guarantee those holes are assigned any values, and so 
    167167    two different struct instances can have the same value for each member, 
     
    524524    than the class definition. 
    525525    It obviates the wordy practice of defining get and set properties 
    526     'just in case' a derived class should need to override them. 
     526    $(SINGLEQUOTE just in case) a derived class should need to override them. 
    527527    It's also a way to have interface classes, which do not have 
    528528    data fields, behave syntactically as if they did. 
  • trunk/docsrc/d-floating-point.dd

    r1322 r2040  
    6666$(P Since $(INFIN) can be produced by overflow, both +$(INFIN) and -$(INFIN) are required. Both +0 and -0 are required in order to preserve identities such as: if $(D x>0), then $(D 1/(1/x) > 0). In almost all other cases, however, there is no difference between +0 and -0.) 
    6767 
    68 $(P It's worth noting that these "special values" are usually not very efficient. On x86 machines, for example, a multiplication involving a NaN, an infinity, or a subnormal can be twenty to fifty times slower than an operation on normal numbers. If your numerical code is unexpectedly slow, it's possible that you are inadvertently creating many of these special values. Enabling floating-point exception trapping, described later, is a quick way to confirm this.) 
     68$(P It's worth noting that these $(SINGLEQUOTE special values) are usually not very efficient. On x86 machines, for example, a multiplication involving a NaN, an infinity, or a subnormal can be twenty to fifty times slower than an operation on normal numbers. If your numerical code is unexpectedly slow, it's possible that you are inadvertently creating many of these special values. Enabling floating-point exception trapping, described later, is a quick way to confirm this.) 
    6969 
    7070$(P One of the biggest factor obscuring what the machine is doing is in the conversion between binary and decimal. You can eliminate this by using the $(D "%a") format when displaying results. This is an invaluable debugging tool, and an enormously helpful aid when developing floating-point algorithms. The $(D 0x1.23Ap+6) hexadecimal floating-point format can also be used in source code for ensuring that your input data is $(I exactly) what you intended.) 
     
    132132$(P A key design goal is: it should be possible to write code such that, regardless of the processor which is used, the accuracy is never worse than would be obtained on a system which only supports the $(D double) type.) 
    133133 
    134 $(P (Footnote: $(D real) is close to 'indigenous' in the Borneo proposal for the Java programming language[Ref Borneo]).) 
     134$(P (Footnote: $(D real) is close to $(SINGLEQUOTE indigenous) in the Borneo proposal for the Java programming language[Ref Borneo]).) 
    135135 
    136136$(P Consider evaluating $(D x*y + z*w), where $(D x, y, z) and $(D w) are double.) 
     
    235235$(H2 NaN payloads) 
    236236 
    237 $(P According to the IEEE 754 standard, a 'payload' can be stored in the mantissa of a NaN. This payload can contain information about how or why it was generated. Historically, almost no programming languages have ever made use of this potentially powerful feature. In D, this payload consists of a positive integer.) 
     237$(P According to the IEEE 754 standard, a $(SINGLEQUOTE payload) can be stored in the mantissa of a NaN. This payload can contain information about how or why it was generated. Historically, almost no programming languages have ever made use of this potentially powerful feature. In D, this payload consists of a positive integer.) 
    238238 
    239239$(UL   
     
    305305) 
    306306 
    307 $(H2 Floating point and 'pure nothrow'
     307$(H2 Floating point and $(SINGLEQUOTE pure nothrow)
    308308 
    309309$(P Every floating point operation, even the most trivial, is affected by the floating-point rounding state, and writes to the sticky flags. The status flags and control state are thus 'hidden variables', potentially affecting every $(D pure) function; and if the floating point traps are enabled, any floating point operation can generate a hardware exception. 
  • trunk/docsrc/ddoc.dd

    r1825 r2040  
    517517) 
    518518 
    519 <h4>No Documentation</h4> 
     519<h4>No Documentation<h4> 
    520520 
    521521$(P 
     
    554554$(P 
    555555    Macros can have arguments. Any text from the end of the identifier 
    556     to the closing '$(RPAREN)' is the &#36;0 argument. 
     556    to the closing $(SINGLEQUOTE $(RPAREN)) is the &#36;0 argument. 
    557557    A &#36;0 in the replacement text is 
    558558    replaced with the argument text. 
     
    560560    argument text up to the first comma, &#36;2 from the first comma to 
    561561    the second comma, etc., up to &#36;9. 
    562     &#36;+ represents the text from the first comma to the closing '$(RPAREN)'
     562    &#36;+ represents the text from the first comma to the closing $(SINGLEQUOTE $(RPAREN))
    563563    The argument text can contain nested parentheses, "" or '' strings, 
    564564    <!-- ... --> comments, or tags. 
  • trunk/docsrc/declaration.dd

    r1564 r2040  
    418418 
    419419    $(P  
    420     Aliasing can be used to 'import' a symbol from an import into the 
     420    Aliasing can be used to $(SINGLEQUOTE import) a symbol from an import into the 
    421421    current scope: 
    422422    ) 
     
    427427 
    428428    $(P  
    429     Aliases can also 'import' a set of overloaded functions, that can 
     429    Aliases can also $(SINGLEQUOTE import) a set of overloaded functions, that can 
    430430    be overloaded with functions in the current scope: 
    431431    ) 
  • trunk/docsrc/dstyle.dd

    r1912 r2040  
    5656    ) 
    5757 
    58     $(LI Use $(CODE version (none)) to 'comment out' a piece of trial code 
     58    $(LI Use $(CODE version (none)) to $(SINGLEQUOTE comment out) a piece of trial code 
    5959    that is syntactically valid: 
    6060------------------------------- 
     
    8484    ) 
    8585 
    86     $(LI Use nesting comments to 'comment out' a piece of syntactically invalid code: 
     86    $(LI Use nesting comments to $(SINGLEQUOTE comment out) a piece of syntactically invalid code: 
    8787------------------------------- 
    8888/+++++ 
     
    103103    <dd>Names formed by joining multiple words should have each word 
    104104    other than the first capitalized. 
    105     Names shall not begin with an underscore '_' unless they are private member variables
     105    Names shall not begin with an underscore $(SINGLEQUOTE _)
    106106 
    107107------------------------------- 
     
    131131------------------------------- 
    132132    ) 
    133     $(DD An exception is that eponymous templates that return a value instead of a type should not be 
    134     capitalized, as they are conceptually more similar to functions. 
    135  
    136 ------------------------- 
    137 template GetSomeType(T) {} 
    138 template isSomeType(T) {} 
    139 ------------------------- 
    140     ) 
    141133 
    142134    $(DT Function names) 
     
    148140------------------------------- 
    149141    ) 
    150      
     142 
     143    $(DT Const names) 
     144    $(DD Are in all caps.) 
     145 
    151146    $(DT Enum member names) 
    152     $(DD are in lowerCamelCase.) 
     147    $(DD Are in all caps.) 
    153148 
    154149) 
     
    188183    great potential for creating obfuscated code. In particular, 
    189184    the existing D operators have conventional meanings, such 
    190     as '+' means 'add' and '&lt;&lt;' means 'shift left'. 
    191     Overloading operator '+' with a meaning different from 'add' 
     185    as $(SINGLEQUOTE +) means $(SINGLEQUOTE add) and $(SINGLEQUOTE &lt;&lt;) 
     186    means $(SINGLEQUOTE shift left). 
     187    Overloading operator $(SINGLEQUOTE +) with a meaning different from $(SINGLEQUOTE add) 
    192188    is arbitrarily confusing and should be avoided.  
    193189    ) 
  • trunk/docsrc/errors.dd

    r659 r2040  
    7070    to modify the old code to be compatible with new error types.) 
    7171    $(LI No errors get inadvertently ignored.) 
    72     $(LI 'Quick and dirty' utilities can be written that still 
     72    $(LI $(SINGLEQUOTE Quick and dirty) utilities can be written that still 
    7373    correctly handle errors.) 
    7474    $(LI It is easy to make the error handling source code look good.) 
  • trunk/docsrc/exception-safe.dd

    r659 r2040  
    317317$(OL 
    318318$(LI Perform the SMTP send operation.) 
    319 $(LI Copy the email to the "Sent" folder, which in POP is on the local  
     319$(LI Copy the email to the $(DOUBLEQUOTE Sent) folder, which in POP is on the local  
    320320disk, and in IMAP is also remote.) 
    321321) 
    322322 
    323 $(P Messages should not appear in "Sent" that haven't been actually sent, 
    324 and sent messages must actually appear in "Sent"
     323$(P Messages should not appear in $(DOUBLEQUOTE Sent) that haven't been actually sent, 
     324and sent messages must actually appear in $(DOUBLEQUOTE Sent)
    325325) 
    326326 
     
    331331 
    332332$(OL 
    333 $(LI Copy the message to "Sent" with a changed title "[Sending]  
    334 &lt;Subject&gt;". This operation ensures there's space in the client's IMAP  
     333$(LI Copy the message to $(DOUBLEQUOTE Sent) with a changed title $(DOUBLEQUOTE [Sending]  
     334&lt;Subject&gt;). This operation ensures there's space in the client's IMAP  
    335335account (or on the local disk), the rights are proper, the connection  
    336336exists and works, etc.) 
     
    338338$(LI Send the message via SMTP.) 
    339339 
    340 $(LI If sending fails, delete the message from "Sent". If the message  
     340$(LI If sending fails, delete the message from $(DOUBLEQUOTE Sent). If the message  
    341341succeeds, 
    342 change its title from "[Sending] &lt;Subject&gt;" to "&lt;Subject&gt;".  
     342change its title from $(DOUBLEQUOTE [Sending] &lt;Subject&gt;) to $(DOUBLEQUOTE &lt;Subject&gt;).  
    343343Both of these operation have a high probability to succeed. If the  
    344344folder is local, the probability of success is very high. If the folder  
  • trunk/docsrc/faq.dd

    r1457 r2040  
    7878    $(ITEMR nan, Why are floating point values default initialized to NaN rather than 0?) 
    7979    $(ITEMR assignmentoverloading, Why is overloading of the assignment operator not supported?) 
    80     $(ITEMR keys, The '~' is not on my keyboard?) 
     80    $(ITEMR keys, The $(SINGLEQUOTE ~) is not on my keyboard?) 
    8181    $(ITEMR omf, Can I link in C object files created with another compiler?) 
    8282    $(ITEMR regexp_literals, Why not support regular expression literals 
     
    440440    in D 2.0.) 
    441441 
    442 $(ITEM keys, The '~' is not on my keyboard?) 
     442$(ITEM keys, The $(SINGLEQUOTE ~) is not on my keyboard?) 
    443443 
    444444    $(P On PC keyboards, hold down the [Alt] key and press the 1, 2, and 6 
    445     keys in sequence on the numeric pad. That will generate a '~' 
     445    keys in sequence on the numeric pad. That will generate a $(SINGLEQUOTE ~) 
    446446    character. 
    447447    ) 
  • trunk/docsrc/features2.dd

    r1366 r2040  
    3030    $(LI $(TT std.math.sin), $(TT cos), $(TT tan) are now evaluated at 
    3131    compile time if the argument is a constant.)  
    32     $(LI Added $(LINK2 cpp_interface.html, C++ interface) for 'plugins'.) 
     32    $(LI Added $(LINK2 cpp_interface.html, C++ interface) for $(SINGLEQUOTE plugins).) 
    3333    $(LI Changed result type of 
    3434     $(LINK2 expression.html#IsExpression, $(I IsExpression)) 
  • trunk/docsrc/garbage.dd

    r659 r2040  
    138138 
    139139    $(OL 
    140     $(LI Looking for all the pointer 'roots' into GC allocated memory.) 
     140    $(LI Looking for all the pointer $(SINGLEQUOTE roots) into GC allocated memory.) 
    141141 
    142142    $(LI Recursively scanning all allocated memory pointed to by 
  • trunk/docsrc/htomodule.dd

    r659 r2040  
    106106<h4>Numeric Literals</h4> 
    107107 
    108     Any 'L' or 'l' numeric literal suffixes should be removed, 
     108    Any $(SINGLEQUOTE L) or $(SINGLEQUOTE l) numeric literal suffixes should be removed, 
    109109    as a C $(TT long) is (usually) the same size as a D $(TT int). 
    110     Similarly, 'LL' suffixes should be replaced with a 
    111     single 'L'
    112     Any 'u' suffix will work the same in D. 
     110    Similarly, $(SINGLEQUOTE LL) suffixes should be replaced with a 
     111    single $(SINGLEQUOTE L)
     112    Any $(SINGLEQUOTE u) suffix will work the same in D. 
    113113 
    114114<h4>String Literals</h4> 
    115115 
    116     In most cases, any 'L' prefix to a string can just be dropped, 
     116    In most cases, any $(SINGLEQUOTE L) prefix to a string can just be dropped, 
    117117    as D will implicitly convert strings to wide characters if 
    118118    necessary. However, one can also replace: 
  • trunk/docsrc/lex.dd

    r1422 r2040  
    2020    directed editors relatively easy to produce. 
    2121    It also is possible to compress D source by storing it in 
    22     'tokenized' form. 
     22    $(SINGLEQUOTE tokenized) form. 
    2323 
    2424$(OL 
     
    777777<p> 
    778778    $(LNAME2 binary-literals, Binary integers) are a sequence of binary digits preceded 
    779     by a '0b'
     779    by a $(SINGLEQUOTE 0b)
    780780<p> 
    781     Octal integers are a sequence of octal digits preceded by a '0'
     781    Octal integers are a sequence of octal digits preceded by a $(SINGLEQUOTE 0)
    782782<p> 
    783783    Hexadecimal integers are a sequence of hexadecimal digits preceded 
    784     by a '0x'
     784    by a $(SINGLEQUOTE 0x)
    785785<p> 
    786     Integers can have embedded '_' characters, which are ignored. 
    787     The embedded '_' are useful for formatting long literals, such 
     786    Integers can have embedded $(SINGLEQUOTE _) characters, which are ignored. 
     787    The embedded $(SINGLEQUOTE _) are useful for formatting long literals, such 
    788788    as using them as a thousands separator: 
    789789 
     
    793793------------- 
    794794 
    795     Integers can be immediately followed by one 'L' or one 'u' or both. 
     795    Integers can be immediately followed by one $(SINGLEQUOTE L) or one 
     796    $(SINGLEQUOTE u) or both. 
    796797<p> 
    797798    The type of the integer is resolved as follows: 
     
    971972    <p> 
    972973 
    973     Floating literals can have embedded '_' characters, which are ignored. 
    974     The embedded '_' are useful for formatting long literals to 
     974    Floating literals can have embedded $(SINGLEQUOTE _) characters, which are ignored. 
     975    The embedded $(SINGLEQUOTE _) are useful for formatting long literals to 
    975976    make them more readable, such 
    976977    as using them as a thousands separator: 
  • trunk/docsrc/lisp-java-d.dd

    r659 r2040  
    5656        <p>During the actual programming I did not have to stop and think about anything.  
    5757            The program evolved automatically, once I thought of the actual container for  
    58             the dictionary. It turned out that the 'winning' Lisp version was storing the  
     58            the dictionary. It turned out that the $(SINGLEQUOTE winning) Lisp version was storing the  
    5959            dictionary in a similar manner.</p> 
    6060        <h2>Compiling</h2> 
  • trunk/docsrc/memory.dd

    r1824 r2040  
    327327 
    328328    $(P Mark/Release is equivalent to a stack method of allocating and 
    329     freeing memory. A 'stack' is created in memory. Objects are allocated 
     329    freeing memory. A $(SINGLEQUOTE stack) is created in memory. Objects are allocated 
    330330    by simply moving a pointer down the stack. Various points are 
    331     'marked', and then whole sections of memory are released 
     331    $(SINGLEQUOTE marked), and then whole sections of memory are released 
    332332    simply by resetting the stack pointer back to a marked point. 
    333333    ) 
  • trunk/docsrc/module.dd

    r1577 r2040  
    367367    Sometimes, it's necessary to override the usual lexical scoping rules 
    368368    to access a name hidden by a local name. This is done with the 
    369     global scope operator, which is a leading '.'
     369    global scope operator, which is a leading $(SINGLEQUOTE .)
    370370 
    371371--------- 
     
    381381--------- 
    382382 
    383     The leading '.' means look up the name at the module scope level. 
     383    The leading $(SINGLEQUOTE .) means look up the name at the module scope level. 
    384384 
    385385<a name="staticorder"><h2>Static Construction and Destruction</h2></a> 
  • trunk/docsrc/operatoroverloading.dd

    r1564 r2040  
    262262--- 
    263263 
    264     $(P and the one with the 'better' match is selected. 
     264    $(P and the one with the $(SINGLEQUOTE better) match is selected. 
    265265    It is an error for both to equally match. 
    266266    ) 
  • trunk/docsrc/overview.dd

    r1638 r2040  
    7878    features for the purpose of compensating for primitive compiler 
    7979    technology can be omitted. (An  
    80     example of this would be the 'register' keyword in C, a more 
     80    example of this would be the $(SINGLEQUOTE register) keyword in C, a more 
    8181    subtle example is the macro  
    8282    preprocessor in C.) 
  • trunk/docsrc/pragma.dd

    r1375 r2040  
    1212    $(P Pragmas are a way to pass special information to the compiler 
    1313    and to add vendor specific extensions to D. 
    14     Pragmas can be used by themselves terminated with a ';'
     14    Pragmas can be used by themselves terminated with a $(SINGLEQUOTE ;)
    1515    they can influence a statement, a block of statements, a declaration, or 
    1616    a block of declarations. 
  • trunk/docsrc/pretod.dd

    r659 r2040  
    707707    ) 
    708708 
    709     $(LI Mixin argument replacements don't need to be 'protected' with 
     709    $(LI Mixin argument replacements don't need to be $(SINGLEQUOTE protected) with 
    710710    parentheses to avoid operator precedence regrouping. 
    711711    ) 
  • trunk/docsrc/property.dd

    r1360 r2040  
    2525$(TR $(TD .sizeof)  $(TD size in bytes (equivalent to C's sizeof(type)))) 
    2626$(TR $(TD .alignof) $(TD alignment size)) 
    27 $(TR $(TD .mangleof)    $(TD string representing the 'mangled' representation of the type)) 
     27$(TR $(TD .mangleof)    $(TD string representing the $(SINGLEQUOTE mangled) representation of the type)) 
    2828$(TR $(TD .stringof)    $(TD string representing the source representation of the type)) 
    2929) 
  • trunk/docsrc/rationale.dd

    r659 r2040  
    1212 
    1313    $(P This is the way C++ does it, and it is appealing to be able 
    14     to refer to overloading '+' with 'operator+'. The trouble is 
     14    to refer to overloading $(SINGLEQUOTE +) with $(SINGLEQUOTE operator+). The trouble is 
    1515    things don't quite fit. For example, there are the 
    1616    comparison operators <, <=, >, and >=. In C++, all four must 
     
    116116?</h3> 
    117117 
    118     Let's rephrase that as "if there's a way to express it in the existing 
    119     language, why build it in to the core language?" 
     118    Let's rephrase that as $(DOUBLEQUOTE if there's a way to express it in the existing 
     119    language, why build it in to the core language?) 
    120120    In regards to T.infinity: 
    121121 
     
    136136 
    137137    $(LI The worst, though, is the lengths gone to just to get at infinity, 
    138     implying "the language and compiler don't know anything about IEEE 754 
    139     floating point - so it cannot be relied on." And in fact 
     138    implying $(DOUBLEQUOTE the language and compiler don't know anything about IEEE 754 
     139    floating point - so it cannot be relied on.) And in fact 
    140140    many otherwise excellent C++ compilers 
    141141    do not handle NaN's correctly in floating point comparisons. 
  • trunk/docsrc/regular-expression.dd

    r659 r2040  
    4141 
    4242    $(P If the $(I pattern) contains backslash characters \, 
    43     wysiwyg string literals are used, which have the 'r' prefix 
     43    wysiwyg string literals are used, which have the $(SINGLEQUOTE r) prefix 
    4444    to the string. $(I r) and $(I s) are of type $(B RegExp), but 
    4545    we can use type inference to declare and assign them automatically: 
  • trunk/docsrc/safed.dd

    r1163 r2040  
    1414 
    1515    $(P 
    16     The universal reason I've heard from the turncoats was "productivity." The consensus seems to be that programmers are more productive using Java, C#, Ruby, or Python then they are using C++.  
     16    The universal reason I've heard from the turncoats was $(DOUBLEQUOTE productivity.) The consensus seems to be that programmers are more productive using Java, C#, Ruby, or Python then they are using C++.  
    1717    ) 
    1818 
  • trunk/docsrc/statement.dd

    r1497 r2040  
    228228    <p> 
    229229 
    230     The 'dangling else' parsing problem is solved by associating the 
     230    The $(SINGLEQUOTE dangling else) parsing problem is solved by associating the 
    231231    else with the nearest if statement. 
    232232    <p> 
     
    893893-------------- 
    894894 
    895     $(P Case statements 'fall through' to subsequent 
     895    $(P Case statements $(SINGLEQUOTE fall through) to subsequent 
    896896    case values. A break statement will exit the switch $(I BlockStatement). 
    897897    For example: 
  • trunk/docsrc/struct.dd

    r1399 r2040  
    610610    The postblit has access only to the destination struct object, 
    611611    not the source. 
    612     Its job is to 'fix up' the destination as necessary, such as 
     612    Its job is to $(SINGLEQUOTE fix up) the destination as necessary, such as 
    613613    making copies of referenced data, incrementing reference counts, 
    614614    etc. For example: 
  • trunk/docsrc/template-mixin.dd

    r1425 r2040  
    3434    is defined. It is analogous to cutting and pasting the body of 
    3535    the template into the location of the mixin. It is useful for injecting 
    36     parameterized 'boilerplate' code, as well as for creating 
     36    parameterized $(SINGLEQUOTE boilerplate) code, as well as for creating 
    3737    templated nested functions, which is not possible with 
    3838    template instantiations. 
     
    189189<h2>Mixin Scope</h2> 
    190190 
    191     The declarations in a mixin are 'imported' into the surrounding 
     191    The declarations in a mixin are $(SINGLEQUOTE imported) into the surrounding 
    192192    scope. If the name of a declaration in a mixin is the same 
    193193    as a declaration in the surrounding scope, the surrounding declaration 
  • trunk/docsrc/templates-revisited.dd

    r659 r2040  
    279279  U:I,          // U must be a class that 
    280280                // implements interface I 
    281   char[] string = "hello", 
     281  string str = "hello", 
    282282                // string literal, 
    283283                // default is "hello" 
     
    295295$(P 
    296296Partial and explicit specialization work as they do in C++, except that 
    297 there is no notion of a 'primary' template. All the templates with the 
     297there is no notion of a $(SINGLEQUOTE primary) template. All the templates with the 
    298298same name are examined upon template instantiation, and the one with the 
    299299best fit of arguments to parameters is instantiated. 
     
    630630template decimalDigit(int n)    // [3] 
    631631{ 
    632   const char[] decimalDigit = "0123456789"[n..n+1]; 
     632  const string decimalDigit = "0123456789"[n..n+1]; 
    633633}  
    634634 
     
    636636{    
    637637  static if (n < 0) 
    638      const char[] itoa = "-" ~ itoa!(-n);   
     638     const string itoa = "-" ~ itoa!(-n);   
    639639  else static if (n < 10) 
    640      const char[] itoa = decimalDigit!(n);  
    641   else 
    642      const char[] itoa = itoa!(n/10L) ~ decimalDigit!(n%10L);  
    643 } 
    644  
    645 char[] foo() 
     640     const string itoa = decimalDigit!(n);  
     641  else 
     642     const string itoa = itoa!(n/10L) ~ decimalDigit!(n%10L);  
     643} 
     644 
     645string foo() 
    646646{ 
    647647  return itoa!(264);   // returns "264" 
     
    728728 */ 
    729729 
    730 template regexMatch(char[] pattern) 
    731 { 
    732   char[][] regexMatch(char[] str) 
    733   { 
    734     char[][] results; 
     730template regexMatch(string pattern) 
     731{ 
     732  string[] regexMatch(string str) 
     733  { 
     734    string[] results; 
    735735    int n = regexCompile!(pattern).fn(str); 
    736736    if (n != testFail && n > 0) 
     
    745745 * 
    746746 * Params: 
    747  *  char[] str    the input string to match against 
     747 *  string str    the input string to match against 
    748748 * 
    749749 * Returns: 
     
    755755template testEmpty() 
    756756{ 
    757   int testEmpty(char[] str) { return 0; } 
     757  int testEmpty(string str) { return 0; } 
    758758} 
    759759 
     
    761761template testUnion(alias testFirst, alias testSecond) 
    762762{ 
    763   int testUnion(char[] str) 
     763  int testUnion(string str) 
    764764  { 
    765765    int n1 = testFirst(str); 
     
    775775 
    776776/// Match if first part of str[] matches text[] 
    777 template testText(char[] text) 
    778 { 
    779   int testText(char[] str) 
     777template testText(string text) 
     778{ 
     779  int testText(string str) 
    780780  { 
    781781    if (str.length && 
     
    791791template testZeroOrMore(alias testPredicate) 
    792792{ 
    793   int testZeroOrMore(char[] str) 
     793  int testZeroOrMore(string str) 
    794794  { 
    795795    if (str.length == 0) 
     
    808808 
    809809/// Match if term1[0] <= str[0] <= term2[0] 
    810 template testRange(char[] term1, char[] term2) 
    811 { 
    812   int testRange(char[] str) 
     810template testRange(string term1, string term2) 
     811{ 
     812  int testRange(string str) 
    813813  { 
    814814    if (str.length && str[0] >= term1[0] 
     
    820820 
    821821/// Match if ch[0]==str[0] 
    822 template testChar(char[] ch) 
    823 { 
    824   int testChar(char[] str) 
     822template testChar(string ch) 
     823{ 
     824  int testChar(string str) 
    825825  { 
    826826    if (str.length && str[0] == ch[0]) 
     
    833833template testWordChar() 
    834834{ 
    835   int testWordChar(char[] str) 
     835  int testWordChar(string str) 
    836836  { 
    837837    if (str.length && 
     
    857857 */ 
    858858 
    859 template parseTextToken(char[] pattern) 
     859template parseTextToken(string pattern) 
    860860{ 
    861861  static if (pattern.length > 0) 
    862862  { 
    863863    static if (isSpecial!(pattern)) 
    864       const char[] parseTextToken = ""; 
     864      const string parseTextToken = ""; 
    865865    else 
    866       const char[] parseTextToken = 
     866      const string parseTextToken = 
    867867           pattern[0..1] ~ parseTextToken!(pattern[1..$]); 
    868868  }  
    869869  else 
    870     const char[] parseTextToken=""; 
     870    const string parseTextToken=""; 
    871871} 
    872872 
     
    877877 *  consumed    number of characters in pattern[] parsed 
    878878 */ 
    879 template parseUntil(char[] pattern,char terminator,bool fuzzy=false) 
     879template parseUntil(string pattern,char terminator,bool fuzzy=false) 
    880880{ 
    881881  static if (pattern.length > 0) 
     
    885885      static if (pattern.length > 1) 
    886886      { 
    887         const char[] nextSlice = pattern[2 .. $]; 
     887        const string nextSlice = pattern[2 .. $]; 
    888888        alias parseUntil!(nextSlice,terminator,fuzzy) next; 
    889         const char[] token = pattern[0 .. 2] ~ next.token; 
     889        const string token = pattern[0 .. 2] ~ next.token; 
    890890        const uint consumed = next.consumed+2; 
    891891      } 
     
    898898    else static if (pattern[0] == terminator) 
    899899    { 
    900       const char[] token=""; 
     900      const string token=""; 
    901901      const uint consumed = 1; 
    902902    } 
    903903    else 
    904904    { 
    905       const char[] nextSlice = pattern[1 .. $]; 
     905      const string nextSlice = pattern[1 .. $]; 
    906906      alias parseUntil!(nextSlice,terminator,fuzzy) next; 
    907       const char[] token = pattern[0..1] ~ next.token; 
     907      const string token = pattern[0..1] ~ next.token; 
    908908      const uint consumed = next.consumed+1; 
    909909    } 
     
    911911  else static if (fuzzy) 
    912912  { 
    913     const char[] token = ""; 
     913    const string token = ""; 
    914914    const uint consumed = 0; 
    915915  } 
     
    932932 */ 
    933933 
    934 template regexCompileCharClass2(char[] pattern) 
     934template regexCompileCharClass2(string pattern) 
    935935{ 
    936936  static if (pattern.length > 0) 
     
    944944          alias testRange!(pattern[0..1], pattern[2..3]) termFn; 
    945945          const uint thisConsumed = 3; 
    946           const char[] remaining = pattern[3 .. $]; 
     946          const string remaining = pattern[3 .. $]; 
    947947        } 
    948948        else // length is 2 
     
    957957        alias testChar!(pattern[0..1]) termFn; 
    958958        const uint thisConsumed = 1; 
    959         const char[] remaining = pattern[1 .. $]; 
     959        const string remaining = pattern[1 .. $]; 
    960960      } 
    961961    } 
     
    964964      alias testChar!(pattern[0..1]) termFn; 
    965965      const uint thisConsumed = 1; 
    966       const char[] remaining = pattern[1 .. $]; 
     966      const string remaining = pattern[1 .. $]; 
    967967    } 
    968968    alias regexCompileCharClassRecurse!(termFn,remaining) recurse; 
     
    988988 */ 
    989989 
    990 template regexCompileCharClassRecurse(alias termFn,char[] pattern) 
     990template regexCompileCharClassRecurse(alias termFn,string pattern) 
    991991{ 
    992992  static if (pattern.length > 0 && pattern[0] != ']') 
     
    10121012 */ 
    10131013 
    1014 template regexCompileCharClass(char[] pattern) 
     1014template regexCompileCharClass(string pattern) 
    10151015{    
    10161016  static if (pattern.length > 0) 
     
    10451045 */ 
    10461046 
    1047 template regexCompilePredicate(alias test, char[] pattern) 
     1047template regexCompilePredicate(alias test, string pattern) 
    10481048{ 
    10491049  static if (pattern.length > 0 && pattern[0] == '*') 
     
    10681068 */ 
    10691069 
    1070 template regexCompileEscape(char[] pattern) 
     1070template regexCompileEscape(string pattern) 
    10711071{ 
    10721072  static if (pattern.length > 0) 
     
    11031103 */ 
    11041104 
    1105 template regexCompile(char[] pattern) 
     1105template regexCompile(string pattern) 
    11061106{ 
    11071107  static if (pattern.length > 0) 
     
    11091109    static if (pattern[0] == '[') 
    11101110    { 
    1111       const char[] charClassToken = 
     1111      const string charClassToken = 
    11121112          parseUntil!(pattern[1 .. $],']').token; 
    11131113      alias regexCompileCharClass!(charClassToken) charClass; 
    1114       const char[] token = pattern[0 .. charClass.consumed+2]; 
    1115       const char[] next = pattern[charClass.consumed+2 .. $]; 
     1114      const string token = pattern[0 .. charClass.consumed+2]; 
     1115      const string next = pattern[charClass.consumed+2 .. $]; 
    11161116      alias charClass.fn test; 
    11171117    } 
     
    11191119    { 
    11201120      alias regexCompileEscape!(pattern[1..pattern.length]) escapeSequence; 
    1121       const char[] token = pattern[0 .. escapeSequence.consumed+1]; 
    1122       const char[] next = 
     1121      const string token = pattern[0 .. escapeSequence.consumed+1]; 
     1122      const string next = 
    11231123          pattern[escapeSequence.consumed+1 .. $]; 
    11241124      alias escapeSequence.fn test; 
     
    11261126    else 
    11271127    { 
    1128       const char[] token = parseTextToken!(pattern); 
     1128      const string token = parseTextToken!(pattern); 
    11291129      static assert(token.length > 0); 
    1130       const char[] next = pattern[token.length .. $]; 
     1130      const string next = pattern[token.length .. $]; 
    11311131      alias testText!(token) test; 
    11321132    } 
    11331133     
    11341134    alias regexCompilePredicate!(test, next) term; 
    1135     const char[] remaining = next[term.consumed .. next.length]; 
     1135    const string remaining = next[term.consumed .. next.length]; 
    11361136     
    11371137    alias regexCompileRecurse!(term,remaining).fn fn; 
     
    11411141} 
    11421142 
    1143 template regexCompileRecurse(alias term,char[] pattern) 
     1143template regexCompileRecurse(alias term,string pattern) 
    11441144{ 
    11451145  static if (pattern.length > 0) 
     
    11531153 
    11541154/// Utility function for parsing 
    1155 template isSpecial(char[] pattern) 
     1155template isSpecial(string pattern) 
    11561156{ 
    11571157  static if ( 
  • trunk/docsrc/traits.dd

    r1457 r2040  
    320320    $(P Takes two arguments, the second must be a string. 
    321321    The result is an expression formed from the first 
    322     argument, followed by a '.', followed by the second 
     322    argument, followed by a $(SINGLEQUOTE .), followed by the second 
    323323    argument as an identifier. 
    324324    ) 
  • trunk/docsrc/tuple.dd

    r659 r2040  
    4242 
    4343    $(P Tuples can be used as arguments to templates, and if so 
    44     they are 'flattened' out into a list of arguments. 
     44    they are $(SINGLEQUOTE flattened) out into a list of arguments. 
    4545    This makes it straightforward to append a new element to 
    4646    an existing tuple or concatenate tuples:) 
     
    8282--- 
    8383 
    84     $(P These make it simple to produce the 'head' and 'tail' 
     84    $(P These make it simple to produce the $(SINGLEQUOTE head) and $(SINGLEQUOTE tail) 
    8585    of a tuple. The head is just TP[0], the tail 
    8686    is TP[1 .. length]. 
  • trunk/docsrc/warnings.dd

    r659 r2040  
    44 
    55    $(P Depending on one's point of view, warnings are either a symptom 
    6     of broken language design or a useful 'lint' like tool to analyze 
     6    of broken language design or a useful $(SINGLEQUOTE lint) like tool to analyze 
    77    code and look for potential trouble spots. 
    88    Most of the time, those trouble spots will be legitimate code 
     
    109109    variable $(I length) gets defined and set to be the length 
    110110    of that array. The scope of the $(I length) is from the opening 
    111     '[' to the closing ']'
     111    $(SINGLEQUOTE [) to the closing $(SINGLEQUOTE ])
    112112    ) 
    113113