Solved

strings

Posted on 2004-08-11
3
240 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
  • 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 250 total points
ID: 11771663
sorry 13 times "A"
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now