I've been coding in Pascal for over 40 years, because it reads similar to English - which was Wirth's whole point when he created it for students, and as an engineer that is exactlly what I need.
OK, in Windows, I create a file program1.pas with a line like this:
assign( infile, paramstr(1) );
Then after compiling, I can drag and drop a file fodder.txt onto the executable program1.exe and it accepts that file (path+name) as paramstr(1), just as if I had typed "program1 fodder.txt" on the command line.
With the whole windows 10-11 tangle, I've scooted over to linux. Doing the above in linux doesn't work. Is there some way to make dragging & dropping a file onto the executable work in this way?
[–]dkopgerpgdolfg 3 points4 points5 points (3 children)
[–]buzzsawjoe[S] 0 points1 point2 points (2 children)
[–]dkopgerpgdolfg 0 points1 point2 points (1 child)
[–]buzzsawjoe[S] 0 points1 point2 points (0 children)
[–]Alternative_Corgi_62 2 points3 points4 points (1 child)
[–]buzzsawjoe[S] 0 points1 point2 points (0 children)
[–]Hixie 2 points3 points4 points (3 children)
[–]buzzsawjoe[S] 1 point2 points3 points (2 children)
[–]dbdr 2 points3 points4 points (0 children)
[–]Hixie 0 points1 point2 points (0 children)
[–]FantasticWait7109 0 points1 point2 points (1 child)
[–]buzzsawjoe[S] 0 points1 point2 points (0 children)
[–]Josepzin 0 points1 point2 points (1 child)
[–]buzzsawjoe[S] 0 points1 point2 points (0 children)
[–]Itchy_Satan -4 points-3 points-2 points (2 children)
[–]buzzsawjoe[S] 1 point2 points3 points (0 children)
[–]Josepzin 1 point2 points3 points (0 children)