Correction for word wrap

 BBS: Inland Empire Archive
Date: 03-09-92 (11:17)             Number: 169
From: MICHAEL MALLEY               Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: Correction for word wrap       Conf: (11) Quik_Bas

Hello everybody! A little while back I posted some code that would allow you to edit an array utilizing word wrap. Well a bug has been found. If you enter a word that will be > the entire width of the line, when you press another letter, instead of wrapping that character to the next line, it will wrap a copy of the last character on the current line. Listed below is the 2 line fix that needs to be added. -----------------[ In the function InsertCharacter ]---------------- SELECT CASE Counter CASE 0 '--- There are no spaces pass one character down to the next line Test$ = RIGHT$(Array(ARow), 1) GOSUB AppendSpace IF ArrayCol > Length AND ArrayRow = ARow THEN Here ----+--[ Test$ = Char |--[ GOSUB AppendSpace ArrayRow = NextRow ArrayCol = 1 Temp = InsertCharacter(Test$, Array(), NextRow, 1) ELSE . . . CASE IS < ACol ----------------------[ End code fix ]-------------------- Sorry everybody! :) * SLMR 2.1a * I just found the *last* bug --- Maximus 2.01wb * Origin: UltraTech - Nashville, TN (615) 356-0453 {HST} (1:116/30)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET