Announcement

Collapse
No announcement yet.

Post Code Test (again)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Post Code Test (again)

    Trying to duplicate "forum removing backslashes" problem mentioned in another thread before suggesting a code tag cure.

    36160 RQD$=SOURCE_PTH$+"\SOURCE.DUD"+TRIM$(DudLogFileName$(I))
    ^^^^pasted from forum

    .\testdir\testfile.bas <<=== typed here

    .\testdir\testfile.bas <<=== pasted here from IDE
    unable to duplicate

    Code:
    36160 RQD$=SOURCE_PTH$+"\SOURCE.DUD"+TRIM$(DudLogFileName$(I))
    The code tags also stop wrapping of long lines of code if browser window is too narrow. The code section gets a scroll bar if needed. Text outside code wraps as normal.
    Mono-spaced font automatically used in code sections.
    Spaces used for indent are retained. (though not a problem for line number style coding)
    Dale

  • #2
    This is a slash inside quotes: ""

    Edit: Yep, it disappeared!


    This is a slash inside quotes inside code tags
    Code:
     "\"

    Comment


    • #3

      36160 RQD$=SOURCE_PTH$+"\SOURCE.DUD"+TRIM$(DudLogFileName$(I))

      That one had a quote after SOURCE_DUD and before the quote. It disappeared.

      It was actually
      Code:
      36160 RQD$=SOURCE_PTH$+"\SOURCE.DUD\"+TRIM$(DudLogFileName$(I))

      Comment


      • #4
        And here's just backlash, $DQ: "

        Edit: Yep, it looks as though the forum software strips backslashes which come immediately before a $DQ.

        Comment


        • #5
          This is a slash inside quotes: ""
          This is a double slash inside quotes "\".

          Rod
          In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

          Comment


          • #6
            Double slash after DUD-
            36160 RQD$=SOURCE_PTH$+"\SOURCE.DUD\"+TRIM$(DudLogFileName$(I))
            Rod
            In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

            Comment


            • #7
              The following is copy/pasted from post 5.
              This is a double slash inside quotes ""
              You nailed it, Stuart.
              Rod
              In some future era, dark matter and dark energy will only be found in Astronomy's Dark Ages.

              Comment


              • #8
                Okay, thanks for showing how it fails. Though I was hoping to put source code (code tag) instructions and link to Adam's post in post 2 here. Ah well, where it goes is where it goes.

                Cheers,
                Dale

                Comment


                • #9
                  The forum software is not handling source code the way it used to (for some time now), so read Adam's post first, at:
                  https://forum.powerbasic.com/forum/a...ing#post789625

                  Type "regular" text in the compose box if you want, click the icon Adam showed, click the large bold # icon, paste the source code between the tags. Type more "regular" text after the /code tag (square brackets not shown) if you want.

                  Alternate method:
                  In the IDE, or where ever you create code, put '{code} before the code to be copied, '{/code} after the code to be copied. (replace curly brackets with square brackets)((I used curly to make the tags show on the forum in this post))(((note the apostrophe, so tags don't upset the compiler)))
                  Copy the source code including the remarked tags.
                  Here in Post Reply compose box, click the icon Adam showed, then paste. 2nd click on that icon and you may edit inside, or outside the source code.

                  BE VERY CAREFUL NOT TO DAMAGE THE CODE TAGS! Or, the forum auto-save could ruin the job.

                  This corrects/prevents loss of indentation, loss of backslashes before double quote, word wrapping of lines too long for browser window (code box gets horizontal scroll bar, "regular" text still wraps), and uses monospaced font for vertical alignment.

                  Cheers,
                  Dale

                  Comment

                  Working...
                  X