01-22-2023, 10:01 PM
I have attempted to fix a few bugs in this program I offered latest. The update is in post #9 which is:
https://staging.qb64phoenix.com/showthre...4#pid12964
Unfortunately on Linux I came across a "don't want to work" type of situation in the "loaddraw2" subprogram. Upon getting a non-zero value for "ustrip" second parameter, it has to load the text file twice. The first time to search for underscores to determine which is the true left-hand margin of the picture, and the second to actually load and display the text-file image.
The search turns out 16 as the correct value for "x". The problem is that the block below the search doesn't want to execute the line with "mid$()". (shrugs).
Sending this at command line:
Use this as the input file (called "cooky.txt"):
It was tried, near the very bottom of the whole source code:
as well as:
So I need this tested on Windows to see if it works like it should.
https://staging.qb64phoenix.com/showthre...4#pid12964
Unfortunately on Linux I came across a "don't want to work" type of situation in the "loaddraw2" subprogram. Upon getting a non-zero value for "ustrip" second parameter, it has to load the text file twice. The first time to search for underscores to determine which is the true left-hand margin of the picture, and the second to actually load and display the text-file image.
The search turns out 16 as the correct value for "x". The problem is that the block below the search doesn't want to execute the line with "mid$()". (shrugs).
Sending this at command line:
Code: (Select All)
$ ./quickdraw cooky.txt --strip
Use this as the input file (called "cooky.txt"):
Code: (Select All)
___________________________________@@@@
________________________________@@@ @@@@@@@@
_____________________________@@ @@@
_________________________@@@@ @@@@@
_______________________@@ @@@
______________________@@ @
_____________________@ @@
____________________@ @@
____________________@ @@
___________________@@ @
__________________@@ @@
__________________@ @
_________________@ @@
_________________@ @@
________________@@ @
________________@ @
________________@ @
_______________@ @
________________@ @
________________@ @
________________@ @
_________________@ @@
_________________@ @@
___________________@@ @
_____________________@@ @
________________________@ @@@
_________________________@@ @@
___________________________@@@ @@
______________________________@@ @@@@@
________________________________@@@@@@@ @@@@@@
_______________________________________@@
It was tried, near the very bottom of the whole source code:
Code: (Select All)
if ustrip then
ff = freefile
open afile for input as ff
do until eof(ff)
line input #ff, b$
locate y, 1
print mid$(b$, x);
y = y + 1
if y > 48 then exit do
loop
close ff
else
ff = freefile
open afile for input as ff
do until eof(ff)
line input #ff, b$
locate y, 1
print b$;
y = y + 1
if y > 48 then exit do
loop
close ff
end if
as well as:
Code: (Select All)
ff = freefile
open afile for input as ff
do until eof(ff)
line input #ff, b$
locate y, 1
if ustrip then
print mid$(b$, x);
else
print b$;
end if
y = y + 1
if y > 48 then exit do
loop
close ff
So I need this tested on Windows to see if it works like it should.