File I/O, Write Block, Carriage Return and Line Feed syntax?

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

  • File I/O, Write Block, Carriage Return and Line Feed syntax?

    I would like to know what the syntax is for a Carriage Return and Line Feed within the PCDMIS WriteBlock command?

    for example in Visual Basic its "vbCrLf"
    Mr. Comment
    SCIROCCO-NT 13-20-10
    B3C-LC Controller (Leitz Protocol), SP600M, TP200
    PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
    sigpic

  • #2
    you could try "\r\n" where
    \r - carriage return
    \n - line feed.
    I have not tried this myself so it is just a guess.

    Comment


    • #3
      I want to say that it is embeded to do it every time. All write operations (write and append) add a carriage return and line feed. If it is your desire to avoid it I can offer nothing. If it is your desire to add it then a blank write line will add a carriage return and line feed.

      Code:
      FILE/WRITELINE,FPTR,
      Will write a carriage return and line feed only.

      Not ssure what your need is.
      <internet bumper sticker goes here>

      Comment


      • #4
        WELCOME BACK CRAIGER!

        Did you come back only because the "fun pc-dmis site" is down?
        sigpic
        Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
        PCDMIS 2012
        Windows Office XP

        Comment


        • #5
          Haven't been on either actually. I stopped over there last week to see what the scoop was on the party. Been taking a break instead of making a complete *** of myself.
          <internet bumper sticker goes here>

          Comment


          • #6
            Originally posted by rangerboat72 View Post
            WELCOME BACK CRAIGER!

            Did you come back only because the "fun pc-dmis site" is down?
            What Ranger said!!!!!!! Get to say hello before the 12:30 (beer thirsty) bell sounds. Have a good Weekend dude
            sigpicRegards,
            Donald Henger
            B&S Micro Excel Pfx
            3.5mr2 & 3.7mr3
            PHH10MQ, TP20 & TP2
            Country Rocks,But Bluegrass RULES!!!

            Comment


            • #7
              Well, WELCOME BACK!

              We all (I think all of us) missed you!






              Henger, you finally changed avatars! The other one wasn't nearly as annoying though...
              sigpic
              Xcel 15-20-10 - PFXcel 7-6-5 - Merlin 11-11-7 - Romer Absolute 7525SI
              PCDMIS 2012
              Windows Office XP

              Comment


              • #8
                Thanks for the suggestion. Unfortunately it just enters those switches as text.
                Mr. Comment
                SCIROCCO-NT 13-20-10
                B3C-LC Controller (Leitz Protocol), SP600M, TP200
                PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
                sigpic

                Comment


                • #9
                  Writeline does add a Carriage Return and Line feed.

                  Write Block does not.

                  I want to write out a very large array of variables in one command instead of many, in the hopes that it will Execute much faster.

                  Maybe Im just stuck.
                  Mr. Comment
                  SCIROCCO-NT 13-20-10
                  B3C-LC Controller (Leitz Protocol), SP600M, TP200
                  PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
                  sigpic

                  Comment


                  • #10
                    That stinks. I did not know that write block did that.

                    I know it is not the best solution but you could pass it to a script that will write it for you. Then you'll have a script acting as a broker of sorts which is not ideal. Ideally you could do it with PCDMIS. I'm afraid I have nothing else to offer. Who knows maybe bitsandmore will show up. He has solutions to some off the wall stuff.
                    Last edited by craiger_ny; 04-20-2007, 02:33 PM.
                    <internet bumper sticker goes here>

                    Comment


                    • #11
                      OK - I think this will do it:
                      "1" + CHR(10)
                      will write a 1 followed by a line feed which should terminate the line of a text based file. So where you want to put a linefeed add a CHR(10) to the text.

                      Comment


                      • #12
                        Originally posted by SABarber View Post
                        OK - I think this will do it:
                        "1" + CHR(10)
                        will write a 1 followed by a line feed which should terminate the line of a text based file. So where you want to put a linefeed add a CHR(10) to the text.
                        Nice, that just worked for me. I had an after thought. If you are using a bunch of variables and (I don't know how exactly you are doing this so it might not be doable) you could assign your variable in a loop and use writeline. That would cut down on code and line feed at the same time. Like I said not knowing how you are doing it that might just end up being cumbersome. Glad to see it can be done the way you wanted it though.

                        Craig
                        <internet bumper sticker goes here>

                        Comment


                        • #13
                          Originally posted by SABarber View Post
                          OK - I think this will do it:
                          "1" + CHR(10)
                          will write a 1 followed by a line feed which should terminate the line of a text based file. So where you want to put a linefeed add a CHR(10) to the text.
                          Did that add an "implied" Carriage return? Or did the line just drop down directly under where it was entered at?
                          Links to my utilities for PCDMIS

                          Comment


                          • #14
                            for a text file this will actually write a CR & LF.

                            Comment


                            • #15
                              Thanks SABarber,

                              That works.

                              Hopefully that will cut down on my execution time too.

                              Got to put that one in my notes.
                              Mr. Comment
                              SCIROCCO-NT 13-20-10
                              B3C-LC Controller (Leitz Protocol), SP600M, TP200
                              PCDMIS CAD++ v4.3 MR1(Build: 12/11/08)
                              sigpic

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X