Results 1 to 10 of 45

Thread: Can't use !i in strings

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #19
    Join Date
    Feb 2009
    Location
    Copenhagen, Denmark
    Posts
    1,682

    Default Re: Can't use !i in strings

    Or alternatively the semantics for string literals could be changed so that compiler-variable-substitution does not take place by default.


    Then one would need an alternative syntax for when you DO want CVS to take place. This syntax would likely be awkward but one could argue that CVS is already very awkward when you don't expect it and with 99% probability you'll never even think about using it in an entire career.

    What could such an akward syntax be? If you use ! as a kind of string literal operator

    "Error number !d in line !a of file !c"!"d,a"

    could mean substitute variables d and a (but not c), while

    "Error number !d in line !a of file !c"!""

    could mean substitute all.


    -Sture
    Last edited by Sture; 13-Jan-2020 at 09:20 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •