|
Post by pierre on May 11, 2023 7:37:37 GMT -5
Tab(n) printing on the mainwin does not work properly in LB5 alpha.
Instead of printing on the (n-th) column of the mainwin, as it does correctly in LB 4.5.1, Tab(n) prints (n) columns after the last preceeding character, which results in an unordered representation.
code:
print "FirstName"; tab(15); "LastName"; tab(30); "Age" print "John"; tab(15); "Doe"; tab(30); 25
output in LB 4.5.1 :
FirstName LastName Age John Doe 25
output in LB 5 alpha :
FirstName LastName Age John Doe 25
|
|
honky
Full Member
Posts: 101
|
Post by honky on May 14, 2023 11:39:08 GMT -5
for x=1 to n if nom$(x)="" then [passfora] nom1$=word$(nom$(x),1): w1$=word$(nom$(x),2): c1$=word$(nom$(x),3): s1$=word$(nom$(x),4) dl$=word$(nom$(x),5): nl$=word$(nom$(x),6): a1$=word$(nom$(x),7)': a2$=word$(nom$(x),8) nom$(x) = nom1$ + space$(25-len(nom1$)) +_ w1$ + space$(15-len(w1$))+_ c1$ + space$(13-len(c1$))+_ s1$ + space$(10-len(s1$)) +_ dl$ +space$(10-len(dl$))+_ nl$ + space$(10-len(nl$))+ _ a1$ +space$(10-len(a1$))' + _ ' a2$+space$(12-len(a2$)) [passfora] next x
|
|
|
Post by pierre on May 14, 2023 16:35:22 GMT -5
Yes, that is a good idea for a workaround. Applying it to my example, it gives:
'**************************************
title$ = "FirstName,LastName,Age" : print title$ title1$ = word$(title$,1,",") title2$ = word$(title$,2,",") title3$ = word$(title$,3,",")
name$ = "John,Doe,25" : print name$ name1$ = word$(name$,1,",") name2$ = word$(name$,2,",") name3$ = word$(name$,3,",")
print print "tabular printing :" print
print title1$ + space$(15 - len(title1$)); title2$ + space$(15 - len(title2$)); title3$
print name1$ + space$(15 - len(name1$)); name2$ + space$(15 - len(name2$)); name3$
'****************************************
But what I wanted to point out is that LB has a specific Tab(n) function, and that function does not work correctly in LB5 alpha.
pierre
|
|