Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

strings

Posted on 2004-08-11
3
Medium Priority
?
249 Views
Last Modified: 2010-04-23
I still cant understand why this wont work., not that it doesnt do anything but  the if statement to say that the characters have gone beyond column 76should goto the next line but doesn't.  Can someone please help a beginner.


Public Sub WLBoard(ByVal text As String)
        Dim i As Integer
        Dim c As String
        Dim row As Integer = 0 ' Set the Row position to zero
        Dim col As Integer = 0 ' Set the Column position to zero

        For i = 0 To text.Length - 1

            c = text.Substring(i, 1)

            If c.Equals("A") Then
 'should be col instead of i*6 but i need a way to add 'spaces 'between the words
               
Call A(i*6, row)                
 col = col + 6 ' the next character is 6 columns

            End If
            If col > 76 Then
                row = row + 11 ' go down one line 11 rows
                col = 0 ' set column back to column 0
            End If
0
Comment
Question by:gbilios
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Expert Comment

by:Arthur_Wood
ID: 11771600
have you placed a BREAKPOINT at the line that reads


  For i = 0 To text.Length - 1


and then sinlge-stepped through the code, to see what is actually happening?  That should help you figure out what is really going on, and then you can figure out how to fix it.

AW
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11771659
What is the text you send to the WLBoard, because if there aren't 7 letters "A" in that string col will never reach 76
0
 
LVL 25

Accepted Solution

by:
RonaldBiemans earned 750 total points
ID: 11771663
sorry 13 times "A"
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question