I have a field member which has 1500+ lines of text at varying lengths. I'm trying to
write a repeat loop that will go through each line, count the characters and add one
space at the beginning of the line and then x number of spaces at the end of the line
so all lines have 100 characters. Although I've sucessfully writen other repeat loops
in the past, I'm getting confused with this one (still relatively new to lingo).
Below, is where I'm at with the code. But this is adding 1500+ lines of nothing but
spaces. Could someone please help me understand way this is not working? Please
forgive my newbeeness.
on makeFieldLengths100
global z, x, theLine, numberOfSpaces, howManySpaces, theCharacter, theNewLine
z = member("AccountMastText").line.count--the number of lines in the field
repeat with i = 1 to z--do all lines
theLine = line i of field "AccountMastText"
put " " before theLine--add a space before theLine
x = the number of chars in theLine--number of chars in theLine
numberOfSpaces = 100 - x--number of spaces to add
theCharacter = " "--a space
repeat with m = 1 to numberOfSpaces--number of spaces to add
put theCharacter &RETURN after theLine
end repeat
end repeat
end makeFieldLengths100
As always, with much graditude & respect.
g fritzinger
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]