QB64 Phoenix Edition
"Locate" in the program - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: Chatting and Socializing (https://staging.qb64phoenix.com/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=2)
+--- Thread: "Locate" in the program (/showthread.php?tid=531)

Pages: 1 2 3 4 5


RE: "Locate" in the program - Pete - 06-09-2022

or...

Code: (Select All)
PRINT "horse"
PRINT "cow"
PRINT "mule"
PRINT "pig"
PRINT "Why bring Steve's farm into this?"

PRINT: PRINT: PRINT
' Now do it again but so it indents 5 spaces...

printx "horse"
printx "cow"
printx "mule"
printx "pig"
printx "Why bring Steve's farm into this?"

PRINT: PRINT: PRINT

printr "horse"
printr "cow"
printr "mule"
printr "pig"
printr "Why bring Steve's farm into this?"

SUB printx (x$)
    LOCATE , 5
    PRINT x$
END SUB

SUB printr (x$)
    LOCATE , _WIDTH - LEN(x$) - 5
    PRINT x$
END SUB

Pete


RE: "Locate" in the program - Kernelpanic - 06-09-2022

(06-08-2022, 09:49 PM)RhoSigma Wrote:
(06-08-2022, 08:39 PM)Kernelpanic Wrote: Yes, apparently I really have a problem describing what I mean in English.

I'll write the program to end and then show the result. Then one can see what I meant.  Wink

Oder beschreibe dein Problem einfach mal auf deutsch, vielleicht kan ich dir ja weiterhelfen. Smile

Schon mal ein paar Infos vorweg:
- LOCATE ist Satzaktiv, nicht modal, d.h. ein LOCATE für ein PRINT (USING)
- Wenn du immer 2 Zeichen Rand haben willst, dann kannst du entweder deine PRINTs mit TAB kombinieren,
z.B. TAB(2);PRINT USING ....
- oder füge einfach 2 Leerzeichen am Anfang der Ausgabetexte ein:
"  Fertigungsmaterial"
"  +8% Gemeinkosten...."
"  -----------------------"

Danke! Ich habe es jetzt noch mal in Englisch beschrieben, sonst verstehen es wieder andere nicht.

It's only all about the distance from the edge.
There is no other way on the command line.
I've written the program before, first with Visual J++ from MS, and then again with VisualBasic 4 Prof. Let's see if I can find a printout of it.

I've noticed another problem now, a clean formatting of the inputs and outputs. This cannot be done on the command line.

@Pete - nice program!  Big Grin

[Image: Locate-BSP2022-06-09-163616.jpg]


RE: "Locate" in the program - Kernelpanic - 06-09-2022

Format problem:

[Image: Abgebot-Formatierung2022-06.jpg]


RE: "Locate" in the program - James D Jarvis - 06-09-2022

Have you tried the "PRINT USING" command? I've never been much of a fan of it but it may indeed be the solution you seek without writing a custom routine.


RE: "Locate" in the program - Kernelpanic - 06-09-2022

(06-09-2022, 03:16 PM)James D Jarvis Wrote: Have you tried the "PRINT USING" command? I've never been much of a fan of it but it may indeed be the solution you seek without writing a custom routine.

Yes, I have. But it's useless. The problem is, it has to work for all inputs and outputs, whether 1,400.00 or 23,670,00.00.


RE: "Locate" in the program - Kernelpanic - 06-09-2022

Found! This is what it looked like back then (monitor 640x480) and a dot matrix printer.

[Image: Angebotskalkulation-VB.jpg]


RE: "Locate" in the program - James D Jarvis - 06-09-2022

(06-09-2022, 04:12 PM)Kernelpanic Wrote:
(06-09-2022, 03:16 PM)James D Jarvis Wrote: Have you tried the "PRINT USING" command? I've never been much of a fan of it but it may indeed be the solution you seek without writing a custom routine.

Yes, I have. But it's useless. The problem is, it has to work for all inputs and outputs, whether 1,400.00 or 23,670,00.00.

Yeah, I never much cared for it. Sorry I couldn't be more help.


RE: "Locate" in the program - RhoSigma - 06-09-2022

(06-09-2022, 04:30 PM)James D Jarvis Wrote:
(06-09-2022, 04:12 PM)Kernelpanic Wrote:
(06-09-2022, 03:16 PM)James D Jarvis Wrote: Have you tried the "PRINT USING" command? I've never been much of a fan of it but it may indeed be the solution you seek without writing a custom routine.

Yes, I have. But it's useless. The problem is, it has to work for all inputs and outputs, whether 1,400.00 or 23,670,00.00.

Yeah, I never much cared for it. Sorry I couldn't be more help.

That screenshots look like you're seeking for a more UI like interface, have you ever consired to rebuild your program using InForm by Fellippe Heitor or
GuiTools by myself.


RE: "Locate" in the program - Kernelpanic - 06-09-2022

(06-09-2022, 04:30 PM)James D Jarvis Wrote:
(06-09-2022, 04:12 PM)Kernelpanic Wrote:
(06-09-2022, 03:16 PM)James D Jarvis Wrote: Have you tried the "PRINT USING" command? I've never been much of a fan of it but it may indeed be the solution you seek without writing a custom routine.

Yes, I have. But it's useless. The problem is, it has to work for all inputs and outputs, whether 1,400.00 or 23,670,00.00.

Yeah, I never much cared for it. Sorry I couldn't be more help.

It's OK! Thank you for your help.
This is not possible in QB64; I think.

I have now tried to create the input mask in Visual Studio Community 2019. . . it took me 5 minutes alone until I could have done something, yes. And then . . . one can it be forgotten.
(I have 16 GB RAM.)

Visual Basic 3/4 Prof launched with one click and I was good to go.
In German they call something like this: (verschlimmbessert) worsened(?)


RE: "Locate" in the program - Kernelpanic - 06-09-2022

(06-09-2022, 07:50 PM)RhoSigma Wrote:
(06-09-2022, 04:30 PM)James D Jarvis Wrote:
(06-09-2022, 04:12 PM)Kernelpanic Wrote: Yes, I have. But it's useless. The problem is, it has to work for all inputs and outputs, whether 1,400.00 or 23,670,00.00.

Yeah, I never much cared for it. Sorry I couldn't be more help.

That screenshots look like you're seeking for a more UI like interface, have you ever consired to rebuild your program using InForm by Fellippe Heitor or
GuiTools by myself.

No, I haven't tried yet. Let's see. The crucial thing is the formatting of input and output, the rest is banal.

It must look clean, as one would expect from such a program.