Hi, On Sun, Jan 18, 2026 at 2:59 AM Paul Dufresne via Freedos-devel <[email protected]> wrote: > > I am confused as to why my DPMI version ask for prr and prd (input&output > files) rather than > using standard input and output like my Linux version does.
You mean P5 specifically, right? And not P4 or P6? I don't exactly know why GPC did what it did, but you typically must use it like this: "myprog.exe --gpc-rts -n filein:myfile.txt -n fileout:output.txt" You can wrap that in a .BAT or Makefile. Oh, I meant running GPC's output (e.g. pcom.exe) itself, not P5 reading in files. Like I said earlier, P5 is intentionally more limited in file access than a true "standard" Pascal compiler. So you only get "prd" and "prr" for input text file and output text file, respectively (but you CAN'T declare them, and they must be in the program header, IIRC). Normally I make a separate *.FIX file to make minor adjustments to build it with P5. I'd have to dig up an example for you. But if iBiblio wasn't so darn slow to load for me, I could just point you to my builds. (At least my older slower 2013 DJGPP 2.03p2 build, P5PAS11.ZIP, had all of Scott's examples and my GNUmakefile for running the tests.) * http://ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/pascal/p5 It should be there but seemingly never reaches. (I think my web browser is too old, too. Ugh.) > I know the author said to use a specific version of GPC for better respecting > the standard... > but that seems a bit a big change to be because of that. > > If someone knows what I am doing, please explain to me! ;-) The standard did not specify cmdline parameters (unlike ANSI C or Turbo Pascal). So if your "standard" (classic) Pascal program wants to use "paramcount" and "paramstr(1)" (etc.), you'll have to temporarily switch to "{$borland-pascal}", do your thing, and then switch back to "{$classic-pascal}". The classic Pascal dialect left out many things and was very strict in some ways (that Borland blatantly ignored or omitted). It's not perfect, but nothing is. You just have to understand what it was meant for and what only came in other (later) languages (like Modula-2). It's not going to give you similar ANSI C functionality in all ways, nor is it meant to be as full-featured as Ada. Some people claim it's a stepping stone between line-numbered BASIC and C, but that's not quite true. They just never standardized on some things (and the later ISO 10206 Extended Pascal standard was mostly ignored). Then everybody wanted classes, exceptions, etc. Long story short: nobody is ever happy. It's not necessarily "better" or worse than C, structured BASIC, AWK, REXX. It's just different. You have to just appreciate it for what it is. _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
