Silverfrost Forums

Welcome to our forums

Error Levels of SLINK vs SLINK64

25 Mar 2018 6:52 #21664

While compiling using batch file SLINK terminates batch file if some OBJ file does not exist. The SLINK64 in this case just issues warning. Is this SDBG64 issue or I forgot to adjust something?

25 Mar 2018 7:41 #21665

You can modify your batch file and call SLINK64 only if all the necessary OBJ files are available.

@ftn95 xyz.f90 /64
@if not exist xyz.obj goto noobj
slink64 xyz.obj
@goto done
:noobj
@echo No xyz.obj file available to link
:done
26 Mar 2018 12:57 #21669

This behaviour with SLINK64 has now been corrected for the next release. Batch files will terminate in the expected way.

26 Mar 2018 6:24 (Edited: 26 Mar 2018 9:31) #21670

Thanks Mecej4 and Pail. Fixing SLINK64 will allow to use 32bit batch files for 64bits as is. I typically use both methods for 32bit compilation (with IFs/GOTOs and just with SLINK own cancelling) but in some cases canceling BAT file method is a bit more preferable as it is shorter and simpler: over the whole code lifetime one of my BAT files already reached the length of more 400 lines long as there are a lot of files to compile and link and few others are not much shorter...

Mecej4:

  1. how to issue the command so that the batch will be cancelled for better visibility of failed linking? Currently echo method is not different then SLINK64 own warning.
  2. remind me what for @ is used? Do not see difference with or without it
26 Mar 2018 7:25 #21671

Dan, wikipedia says: 'The @ symbol at the start of any line prevents the prompt from displaying that command as it is executed.' and ECHO OFF turns them off permanently, so @ECHO OFF won't show anything ...

Eddie

28 Mar 2018 2:13 #21677

Thanks for the clue Eddie. I have been looking for documentation of .bat files, but never found what I wanted. Any suggestions ?

I have longed for improved flexibility for program input when running from a bat file. I can vaguely recall from the Apollo O/S, it had the facility to pipe in commands from the .bat file, rather than another file, something like (I have forgotten the exact syntax):

program << $ input line 1 input line 2 << $

This would take the 2 lines of input and then the last '<< $' would end input from the .bat file.

The other problem I have is when using ' program < commands.txt' is that when commands.txt is exhausted, I get some sort of end of file error and can't return to standard input.

Anyone got any clues on how to better handle program input when running in a .bat file ?

It is these simple little things that I find annoying about Microsoft O/S. (like how Notepad won't display unix format text files !!)

28 Mar 2018 8:01 #21683

John,

I found it in one on Wikipedia.

I don't use batch files to run programs, except compiling. I'm afraid that I never liked 'question and answer' programs, and if it is so old it runs with input and output files, I live with that, but really the answer is a Windows paradigm interface.

Anything that runs for hours probably needs to be compiled with the fastest compiler and run on the fastest computer you have, and if you put any conversation in it, you are likely to return from a long weekend on Bondi Beach to see a message 'Waiting for input' that appeared 30 seconds after you left the office!

Seriously, there's more on batch files on Wikipedia than I ever dreamed of!

Eddie

28 Mar 2018 12:38 #21684

... just like my printer, which informs me that I'm not using genuine Epson cartridges (at nearly 20x the price) and I need to press continue.

29 Mar 2018 5:08 #21696

John,

Your experiences match mine. However, I can tolerate the Epson ticking me off for using cheapo cartridges, but after all, they are £20 for 5 sets of 6 inks with 5 spare blacks, whereas the Epsons are just short of £80 for 1 set of 6. The driver knows when cheap inks are used, and the driver is sneaky, like printing twice as many copies as you asked for - just to run the inks down. The driver also uses more ink if non-genuine cartridges are used and double-sided printing is selected (so the ink bleeds through), but not on every page, just to annoy, and behaves most badly if you have expensive photo paper loaded (or a printable CD). I'm afraid that Epson has seen the last of my money.

It is a networked printer, but refuses to connect if there is anti-virus running.

More to the point, the driver interface makes all sorts of sloppy programming things. Like you have to select the 3rd radio button in the sequence 'Print all', ;Print current page' and 'Print pages' - where the latter also has a text box to input the range, instead of letting to go straight to the text box and moving the radio button for you. (But my Lexmark laser doesn't delete something highlighted, so doing a Windows standard thing with the 'copies' box gives you 301 copies when you asked for 30.

Tell me how the Lexmark cost £100, but four toner bottles cost £200? If I could only lift the thing and knew where to dispose of it I'd have a new printer each time!

On the non-linear front, if something I'm analysing indicates a hint of overstress, I never bother with non-linear - I redesign it until it doesn't

Eddie

Please login to reply.