Loading ...
Sorry, an error occurred while loading the content.

Re: [libertybasic] Libert use

Expand Messages
  • Stefan Pendl
    ... Add trailing or leading spaces using the SPACE$() function to the strings before you display them. -- Stefan Pendl http://stefanpendl.runbasichosting.com/
    Message 1 of 11 , Aug 28, 2013
    • 0 Attachment
      Am 28.08.2013 16:46, schrieb Lester Larrew:
      > I have an array of 72 strings length 4 to 12. I want to print that array in 6 columns. How to do, please.
      >

      Add trailing or leading spaces using the SPACE$() function to the
      strings before you display them.


      --
      Stefan Pendl
      http://stefanpendl.runbasichosting.com/

      LB 4.04 Pro ... http://www.libertybasic.com/assist.html
      LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

      LB Community Wiki .............. http://basic.wikispaces.com/
      LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
      LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

      Books at http://www.lulu.com/ and http://www.amazon.com/
      Alyce Watson ... APIs for Liberty BASIC
      Carl Gundel .... Beginning Programming with Liberty BASIC

      Windows 7 Home Premium 64-bit SP1
      AMD Turion X2 RM-70 2GHz, 4GB RAM
    • Lester Larrew
      Stefan, the following code will justify the strings so that the last character is on the right.  How do I make it so that all of 1st character of the
      Message 2 of 11 , Aug 28, 2013
      • 0 Attachment
        Stefan,
        the following code will justify the strings so that the last character is on the right.  How do I make it so that all of 1st character of the strings are justified on the right?  Thanks in advance,
        Lester
        cls
        print
        for i=1 to k
        pp=len(a$(i))
        print space$(13-pp);a$(i);
        if i/6=int(i/6) then print
        next I
         


        ________________________________
        From: Stefan Pendl pendl2megabit@... Thanks in advance
        To: libertybasic@yahoogroups.com
        Sent: Wednesday, August 28, 2013 12:39 PM
        Subject: Re: [libertybasic] Libert use


         

        Am 28.08.2013 16:46, schrieb Lester Larrew:
        > I have an array of 72 strings length 4 to 12. I want to print that array in 6 columns. How to do, please.
        >

        Add trailing or leading spaces using the SPACE$() function to the
        strings before you display them.

        --
        Stefan Pendl
        http://stefanpendl.runbasichosting.com/

        LB 4.04 Pro ... http://www.libertybasic.com/assist.html
        LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

        LB Community Wiki .............. http://basic.wikispaces.com/
        LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
        LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

        Books at http://www.lulu.com/ and http://www.amazon.com/
        Alyce Watson ... APIs for Liberty BASIC
        Carl Gundel .... Beginning Programming with Liberty BASIC

        Windows 7 Home Premium 64-bit SP1
        AMD Turion X2 RM-70 2GHz, 4GB RAM



        [Non-text portions of this message have been removed]
      • Stefan Pendl
        ... I don t think that the mainwin will support Arabian or other right to left languages. How are your regional settings set for non-Unicode applications? --
        Message 3 of 11 , Aug 29, 2013
        • 0 Attachment
          Am 29.08.2013 06:16, schrieb Lester Larrew:
          > Stefan,
          > the following code will justify the strings so that the last character is on the right. How do I make it so that all of 1st character of the strings are justified on the right? Thanks in advance,
          > Lester
          > cls
          > print
          > for i=1 to k
          > pp=len(a$(i))
          > print space$(13-pp);a$(i);
          > if i/6=int(i/6) then print
          > next I
          >

          I don't think that the mainwin will support Arabian or other right to
          left languages.

          How are your regional settings set for non-Unicode applications?


          --
          Stefan Pendl
          http://stefanpendl.runbasichosting.com/

          LB 4.04 Pro ... http://www.libertybasic.com/assist.html
          LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

          LB Community Wiki .............. http://basic.wikispaces.com/
          LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
          LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

          Books at http://www.lulu.com/ and http://www.amazon.com/
          Alyce Watson ... APIs for Liberty BASIC
          Carl Gundel .... Beginning Programming with Liberty BASIC

          Windows 7 Home Premium 64-bit SP1
          AMD Turion X2 RM-70 2GHz, 4GB RAM
        • Lester Larrew
          I meant to say that they are now justified on the right and I want them to be justified on the left. Lester ________________________________ From: Stefan Pendl
          Message 4 of 11 , Aug 29, 2013
          • 0 Attachment
            I meant to say that they are now justified on the right and I want them to be justified on the left.
            Lester


            ________________________________
            From: Stefan Pendl <pendl2megabit@...>
            To: libertybasic@yahoogroups.com
            Sent: Thursday, August 29, 2013 9:39 AM
            Subject: Re: [libertybasic] Libert use


             

            Am 29.08.2013 06:16, schrieb Lester Larrew:
            > Stefan,
            > the following code will justify the strings so that the last character is on the right. How do I make it so that all of 1st character of the strings are justified on the right? Thanks in advance,
            > Lester
            > cls
            > print
            > for i=1 to k
            > pp=len(a$(i))
            > print space$(13-pp);a$(i);
            > if i/6=int(i/6) then print
            > next I
            >

            I don't think that the mainwin will support Arabian or other right to
            left languages.

            How are your regional settings set for non-Unicode applications?

            --
            Stefan Pendl
            http://stefanpendl.runbasichosting.com/

            LB 4.04 Pro ... http://www.libertybasic.com/assist.html
            LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

            LB Community Wiki .............. http://basic.wikispaces.com/
            LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
            LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

            Books at http://www.lulu.com/ and http://www.amazon.com/
            Alyce Watson ... APIs for Liberty BASIC
            Carl Gundel .... Beginning Programming with Liberty BASIC

            Windows 7 Home Premium 64-bit SP1
            AMD Turion X2 RM-70 2GHz, 4GB RAM



            [Non-text portions of this message have been removed]
          • Bob Rantzow
            Lester,   I use the following functions for justification:   Function RAStr$(s$, n)         Returns a string
            Message 5 of 11 , Aug 29, 2013
            • 0 Attachment
              Lester,
               
              I use the following functions for justification:
               
              '
              ''''''''''''''''''''''''''''''''''''
              Function RAStr$(s$, n)
                  '
                  ' Returns a string of length 'n' with 's' right-adjusted (leading blanks).
                  '
                  If Len(s$) >= n Then
                      RAStr$ = Mid$(s$, 1, n)
                  Else
                      RAStr$ = Space$(n - Len(s$)) + s$
                  End If
              End Function
              '
              ''''''''''''''''''''''''''''''''''''
              Function LAString$(s$, n)
                  '
                  ' Returns a string of length 'n' with 's' left-adjusted (trailing blanks).
                  '
                  If Len(s$) >= n Then
                      LAString$ = Left$(s$,n)
                  Else
                      LAString$ = s$ + Space$(n - Len(s$))
                  End If
              End Function


              Bob Rantzowrantzow@... 858 755-3906 (Home)858 822-9625 (Cell)

              From: Lester Larrew <luvstrains04@...>
              >To: "libertybasic@yahoogroups.com" <libertybasic@yahoogroups.com>
              >Sent: Thursday, August 29, 2013 7:42 AM
              >Subject: Re: [libertybasic] Libert use
              >

              >I meant to say that they are now justified on the right and I want them to be justified on the left.
              >Lester
              >
              >
              >________________________________
              >From: Stefan Pendl <mailto:pendl2megabit%40yahoo.de>
              >To: mailto:libertybasic%40yahoogroups.com
              >Sent: Thursday, August 29, 2013 9:39 AM
              >Subject: Re: [libertybasic] Libert use
              >
              >

              >
              >Am 29.08.2013 06:16, schrieb Lester Larrew:
              >> Stefan,
              >> the following code will justify the strings so that the last character is on the right. How do I make it so that all of 1st character of the strings are justified on the right? Thanks in advance,
              >> Lester
              >> cls
              >> print
              >> for i=1 to k
              >> pp=len(a$(i))
              >> print space$(13-pp);a$(i);
              >> if i/6=int(i/6) then print
              >> next I
              >>
              >
              >I don't think that the mainwin will support Arabian or other right to
              >left languages.
              >
              >How are your regional settings set for non-Unicode applications?
              >
              >--
              >Stefan Pendl
              >http://stefanpendl.runbasichosting.com/
              >
              >LB 4.04 Pro ... http://www.libertybasic.com/assist.html
              >LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe
              >
              >LB Community Wiki .............. http://basic.wikispaces.com/
              >LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
              >LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/
              >
              >Books at http://www.lulu.com/ and http://www.amazon.com/
              >Alyce Watson ... APIs for Liberty BASIC
              >Carl Gundel .... Beginning Programming with Liberty BASIC
              >
              >Windows 7 Home Premium 64-bit SP1
              >AMD Turion X2 RM-70 2GHz, 4GB RAM
              >
              >
              >
              >[Non-text portions of this message have been removed]
              >
              >
              >

              [Non-text portions of this message have been removed]
            • Stefan Pendl
              ... Just add trailing spaces and the string is left justified. ---code start (watch for line wraps) cls print for i=1 to k pp=len(a$(i)) print
              Message 6 of 11 , Aug 29, 2013
              • 0 Attachment
                Am 29.08.2013 16:42, schrieb Lester Larrew:
                > I meant to say that they are now justified on the right and I want them to be justified on the left.
                > Lester
                >

                Just add trailing spaces and the string is left justified.


                '---code start (watch for line wraps)

                cls
                print
                for i=1 to k
                pp=len(a$(i))
                print a$(i);space$(13-pp);
                if (i mod 6)=0 then print
                next

                '---code end

                --
                Stefan Pendl
                http://stefanpendl.runbasichosting.com/

                LB 4.04 Pro ... http://www.libertybasic.com/assist.html
                LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                LB Community Wiki .............. http://basic.wikispaces.com/
                LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
                LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

                Books at http://www.lulu.com/ and http://www.amazon.com/
                Alyce Watson ... APIs for Liberty BASIC
                Carl Gundel .... Beginning Programming with Liberty BASIC

                Windows 7 Home Premium 64-bit SP1
                AMD Turion X2 RM-70 2GHz, 4GB RAM
              Your message has been successfully submitted and would be delivered to recipients shortly.