Recent

Author Topic: Newbie Questions – Navigating The Text Based Editor  (Read 3381 times)

MrPink

  • New Member
  • *
  • Posts: 15
Newbie Questions – Navigating The Text Based Editor
« on: June 20, 2024, 03:27:30 pm »
Starting off small, but looming large on my end when the path is not clear. Old dog; new tricks – that type thing.

I have some working TP files that would be handy as a printed reference. With one of those old programs on my screen, how do I readily throw that to my printer? FYI, my printer normally defaults to double-sided.

The print command says “Can’t open printer – check device name in print set up.” In the print setup command, my default was ”prn,” but it’s a spot where input is asked for.

Figuring that the editor wants an exact path, what should I enter there? My device is a Brother HL-L2480DW, but I expect the editor needs a particular go-to format.
Thanks,
MrPink

Thaddy

  • Hero Member
  • *****
  • Posts: 16194
  • Censorship about opinions does not belong here.
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #1 on: June 20, 2024, 06:26:14 pm »
Maybe it is just a case of confusing the printer unit (prn/lst support, old school line-printing) with the printerS unit (canvas based modern printing)
Your TP code should work with the printer unit without change.

See:
https://docs.freepascal.org/docs-html/rtl/printer/index-5.html
That also contains an example.
« Last Edit: June 20, 2024, 06:31:47 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8036
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #2 on: June 20, 2024, 06:53:19 pm »
Thaddy, read his posting: he's trying to print his files, not his output.

Well done volunteering to support the text-mode IDE. As Jonas said to somebody in a similar context: you sure pick your fights... :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MrPink

  • New Member
  • *
  • Posts: 15
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #3 on: June 21, 2024, 09:47:09 pm »
Yes, I am trying to print my files, not my output. Having a utilitarian file-print ability seems simple enough. Given that a ready answer to my question did not (readily) surface -- I’m wondering if your comment about “volunteering to support the text-mode IDE” will be burdensomely prophetic.....

Or maybe more to the point, on this forum, what is the estimated percentage of programmers using the old IDE? And for some perspective, is file printing in Lazarus easily done?

Second point. While such printing isn’t my end-all; it's early, and my old-IDE choice can certainly be revisited. As in old dog – newer trick.
Thanks,
MrPink

MarkMLl

  • Hero Member
  • *****
  • Posts: 8036
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #4 on: June 22, 2024, 09:10:32 am »
Or maybe more to the point, on this forum, what is the estimated percentage of programmers using the old IDE? And for some perspective, is file printing in Lazarus easily done?

"Mr. Twain, what would man be without woman?"

"Scarce." ... "Mighty scarce."

Seriously, the text-mode IDE is redundant on any computer system that does have a compatible GUI loaded (Windows, most non-server Linux and so on... wouldn't like to speak for the surviving remnants of Solaris but I'm sure you get my drift). I'm uncomfortable calling it obsolete, out of respect for the people who make sure that it's still buildable as a companion to the underlying FPC compiler.

If anybody was inclined to use it it would be me, since I have a strong feeling that- particularly in the early days- the lack of something comparable with MS's Visual Basic for DOS held Linux back.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MrPink

  • New Member
  • *
  • Posts: 15
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #5 on: June 23, 2024, 08:41:13 pm »
Well then, it would seem I’ve gotten off on the wrong foot – despite my large intent to prioritize the opposite. Looking back at my original post (scene of the crime), the reference therein to “graphical violence” made me feel like the text-mode IDE was a minority/common practice. Evidently not....

Sealing the deal for me was my concluding post there, where I expressed a happy intent for following that (old) yellow brick road. When no one hooked Dorothy from that path, I figured it was a reasonable direction. As a newbie, I had no idea that.......that was a bad idea.

Conveying respect to the old practitioners here, I will now do the Lazarus download and see how I fare. Old dog – new trick!
Thank you,
MrPink

MarkMLl

  • Hero Member
  • *****
  • Posts: 8036
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #6 on: June 23, 2024, 09:53:11 pm »
A few years ago I wrote a medium tester for memory cards etc., with an emphasis on being able to write and check specific patterns and sequences. The code is usable either as a (non-interactive) console program, or as an interactive GUI program using the LCL, or as an interactive TUI program using FreeVision. In that final case I used a marginally-surviving TUI editor rather than placing everything by hand, but still did the compilation and debugging using the Lazarus IDE.

Any of those three can be built using the Lazarus IDE, or from a prompt using Lazbuild. In addition, the console program can be built from a Makefile, however I had to write that manually.

There's a whole lot of guff in Lazarus which is in there because something comparable's in Delphi. That doesn't mean you have to use it: my expectations are rooted in the fairly early TPs I adopted after some years using less friendly tools.

Oh, apropos your earlier question about printing files. Particularly if you eschew Unicode you should be able to use just about any program including word processors etc. even if your IDE of choice (i.e. TUI or GUI) has problems, although you'd be well advised to stick to a monospaced fount. However while I was obviously brought up on the music ruled stuff I've used listings extremely infrequently over the last 25 years or so: a competent IDE such as Lazarus can be relied upon to support multiple windows and usually multiple tabs inside each window. And if one's reasonably near the stockbroker belt one can get some good deals as the well-heeled move up to ever-larger monitors... :-)

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MrPink

  • New Member
  • *
  • Posts: 15
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #7 on: June 24, 2024, 04:10:35 am »
Thanks for the added feedback. I downloaded Lazarus, and it looked foreign enough to me that my comfort level will be best-served with a hands-on reference text. In general, it’s just the way I learn new stuff. I have a successful coding project started, but I’ll nibble at that with the old text-mode IDE. Hopefully, I’ll be able to use the core of that under-construction file in the future Lazarus domain.

Per the source material list, I am considering two “Getting Started with Lazarus” books. One is by Roderick Person (116p); the other by Abiola-Ellison (363p). Any thoughts on those, or others? Or maybe, someone has a favored primer to recommend?
Thanks,
MrPink

duralast

  • New Member
  • *
  • Posts: 23
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #8 on: June 24, 2024, 04:41:29 am »
Thanks for the added feedback. I downloaded Lazarus, and it looked foreign enough to me that my comfort level will be best-served with a hands-on reference text. In general, it’s just the way I learn new stuff. I have a successful coding project started, but I’ll nibble at that with the old text-mode IDE. Hopefully, I’ll be able to use the core of that under-construction file in the future Lazarus domain.

Per the source material list, I am considering two “Getting Started with Lazarus” books. One is by Roderick Person (116p); the other by Abiola-Ellison (363p). Any thoughts on those, or others? Or maybe, someone has a favored primer to recommend?
Thanks,
MrPink

The Lazarus Handbook would be the definitive source on Lazarus. I purchased the two volume set in hardcover a few years ago. It is available at https://www.blaisepascalmagazine.eu/
« Last Edit: June 24, 2024, 04:44:24 am by duralast »

MarkMLl

  • Hero Member
  • *****
  • Posts: 8036
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #9 on: June 24, 2024, 08:35:17 am »
The Lazarus Handbook would be the definitive source on Lazarus. I purchased the two volume set in hardcover a few years ago. It is available at https://www.blaisepascalmagazine.eu/

Is that actually a paper copy? The last time I asked about it nobody really seemed sure.

Is it up to date? Allowing for how dynamic the IDE is if the book still oriented towards the long-running v0.9x it will confuse more than it will enlighten.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

ginoo

  • Jr. Member
  • **
  • Posts: 84
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #10 on: June 24, 2024, 08:38:21 am »
I don't know if it is helpful, I purchased it in paper form on Christmas 2022

MarkMLl

  • Hero Member
  • *****
  • Posts: 8036
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #11 on: June 24, 2024, 09:29:12 am »
I don't know if it is helpful, I purchased it in paper form on Christmas 2022

Thanks. What version of the IDE does it correspond to?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

af0815

  • Hero Member
  • *****
  • Posts: 1379
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #12 on: June 24, 2024, 09:43:37 am »
I don't know if it is helpful, I purchased it in paper form on Christmas 2022

Thanks. What version of the IDE does it correspond to?
According Page 11: lazarus 2.0.10 fpc 3.2.0 
regards
Andreas

ginoo

  • Jr. Member
  • **
  • Posts: 84
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #13 on: June 24, 2024, 10:21:21 am »
same

cdbc

  • Hero Member
  • *****
  • Posts: 1672
    • http://www.cdbc.dk
Re: Newbie Questions – Navigating The Text Based Editor
« Reply #14 on: June 24, 2024, 01:57:38 pm »
Hi
In a broader scope, maybe this could be interesting:http://www.copperwood.com/pub/FreePascalFromSquareOne.pdf
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

 

TinyPortal © 2005-2018