f



To print or not to print

What is a symptom of, when a print statement, inserted into a program
as a diagnostic, removes an error?
-- 
Dieter Britz (dieterbritz<at>yahoo.com)
0
Dieter
1/7/2010 12:51:01 PM
comp.lang.fortran 11941 articles. 2 followers. Post Follow

7 Replies
1598 Views

Similar Articles

[PageSpeed] 10

Dieter Britz wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?


Array bound violation is the most likely.
Some additional memory space is allocated for the purpose of the print
statement, and the array then overflows into that space without any visible
effect.

0
Michel
1/7/2010 1:05:16 PM
Dieter Britz <dieterbritz@yahoo.com> wrote:
> What is a symptom of, when a print statement, inserted into a 
> program as a diagnostic, removes an error?

Without knowing the error it is hard to say.

With x87 floating point, small changes can change the precision
(and/or accuracy) of the result.

-- glen
0
glen
1/7/2010 1:46:55 PM
"Dieter Britz" <dieterbritz@yahoo.com> wrote in message news:hi4llg$eup$1@news.net.uni-c.dk...
| What is a symptom of, when a print statement, inserted into a program
| as a diagnostic, removes an error?

Almost certainly, it is a subscript or substring error.

Less likely causes are uninitialized variables, mismatched
argments/dummy arguments, etc.

For starters you need to turn on all checks. 


0
robin
1/7/2010 3:11:01 PM
Try to explicitly switch off any optimization.
I have this often when the optimizer takes a short-cut
and when the print-statement prevents optimization and
therefore the faulty short-cut in command execution.

Also: activate all checks at compile time and see what happens now.
Try different compilers. I like g95 since it warns quite often
and has relatively readable/understandable error-messages.

A.
0
Arjan
1/7/2010 3:41:41 PM
On Jan 7, 4:51 am, Dieter Britz <dieterbr...@yahoo.com> wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?
> --
> Dieter Britz (dieterbritz<at>yahoo.com)

It can mean many things.  If the code is compiled with
optimization enabled, a PRINT statement can cause some
optimizations to be disabled.  The Fortran language
places restrictions on what programs can do that
optimizers exploit.  If a program violates one of those
restrictions, the program might work fine when compiled
without optimization, but fail when compiled with
optimization.  Adding a PRINT statement can cause the
optimizations that cause the program to fail to be
disabled.  Of course, it is also possible that the
optimizer, which tend to be large, complex, and
finicky programs, contains one or two bugs.

Bob Corbett
0
robert
1/8/2010 9:19:51 AM
On Jan 7, 5:51=A0pm, Dieter Britz <dieterbr...@yahoo.com> wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?
> --
> Dieter Britz (dieterbritz<at>yahoo.com)

I faced a similar situation. the error i was getting was segmentation
fault but inserting a print statement removed the error.

As Michel suggested, check your array bounds, and the assignment
statements to arrays..
0
aeroguy
1/11/2010 2:18:01 AM
Dieter Britz wrote:
> What is a symptom of, when a print statement, inserted into a program
> as a diagnostic, removes an error?

This manifests the Heisenbug Uncertainty Principle.
0
Gib
1/12/2010 2:27:35 AM
Reply:

Similar Artilces:

Print-Print versus Print-Preview-Print
Is there a difference between the following operations from any given program? Let's say Safari, because I often want to Preview to see how many pages there are before deciding to print. From Safari: File > Print --> print dialog > Print versus From Safari: File > Print --> print dialog then choose Preview --> Abode Reader view then print directly from Adobe using File > Print --> print dialog > Print It sounds like a waste of steps, but after I preview in Adobe Reader, I usually close the preview and go back and print directly from Safari. The outputs ...

PRINT@ vs PRINT`
Hi I'm at the moment converting some old cassettes. This is a rather slow process and there is one quirk I have come across. These are 500baud level II tapes, mostly basic programs. In some of these old basic programs PRINT@ is instead PRINT`, that is instead of @ (0x40) you get ` (0x60). This results in an SN error (Syntax) on a model I ROM basic and LDOS disk basic. On model III ROM basic it still lists PRINT` but it works. So it seems that the tapes are from a model III or 4. I wonder why ever is there this quirk, is it a bug (model III/4)? Those programs ar...

Printing date on prints
I am trying to learn how to use a new Nikon D50 DSLR. In our city, triecentennial anniversary is going on yesterday and today. They tried to re-enact Spanish settler about 300 years ago. Beautiful Spanish costumes of men and women on horseback were everywhere and we can see banners that display coasts of arms. So I took some pictures and tried to print using a Canon printer. Pictures were gorgeous but I was not able to figure out how to print date stamp. With pictures taken with Sony P&S cameras, I used to print date. Does anybody know how to print date? John "...

How do I print borderless prints?
Hi. I'm trying to make borderless prints and not having any luck. I use Paint Shop Pro 8. I'm printing on an Epson 785EPX printer and using Epson Photo Paper, 4x6, non-perforated. No matter how I play with the settings, I get a border around the prints. I'm printing from digital pictures I took. I've tried from the original as it came out of the camera, at 2240 x 1488, and I also tried re-sizing to 640 x 480. Still no luck. I'm using a setting of "fit to page". The size is at 6.00 x 3.986 inches. Still a border. I'm wasting paper trying to get it right. Any id...

print v. print()
I am learning Python from Hammond & Robinson's _Python Programming on Win32_, January 2000 edition. This print "Sleeping for 10 seconds" which appears in some example code, fails to... um... Compile? Interpret? Well, whatever the word is, it fails. Trial and error revealed that print("Sleeping for 10 seconds") does the trick. I am using version 3.1.2, presumably the book's authors used some earlier version. So why the change from print to print()? I should warn you that I know nothing about computers in general or Python in pa...

How do I print borderless prints?
Hi. I'm trying to make borderless prints and not having any luck. I use Paint Shop Pro 8. I'm printing on an Epson 785EPX printer and using Epson Photo Paper, 4x6, non-perforated. No matter how I play with the settings, I get a border around the prints. I'm printing from digital pictures I took. I've tried from the original as it came out of the camera, at 2240 x 1488, and I also tried re-sizing to 640 x 480. Still no luck. I'm using a setting of "fit to page". The size is at 6.00 x 3.986 inches. Still a border. I'm wasting paper trying to get it right. Any id...

HP-UX Print Problem
We have OKI 395 dot matrix printers attached to HP JetDirect 170X print servers. We run an application on a HP-UX 11 server which spools print jobs and passes them to the line print daemon. On the LAN this works without error, however we have problems over the WAN, with WAN sites linked via a site-to-site ipsec vpn. The majority of print jobs at these remote sites print without error, however several jobs per day get 'stuck' and print out the same job repeatedly. The only way to resolve this problem is to cancel the print job, which then releases all other jobs in the queue to the ...

PDF for Printing Books Print-on-Demand: How to Discover "print quality"
Hello and thanks very much in advance, I've been preparing books for printing for print-on-demand. My question is: If I open a pdf file, how can I tell the "print-quality" of the file? I'm not sure I'm using the correct terms: I know that when creating a pdf, Acrobat offers various options, and some are better for printing books. What I want to do is use different PDF-making applications, create the PDF, and then discover what quality has been made. Thanks again ... RW "booklover" <robinwhitman@gmail.com> wrote in message news:1172329557.423364.23369...

Error 0 occured at printing invoke node blb bla bla..., if I try to change the Postscript printing to bitmap printing using Options-printing menu.
Who might comment why I can not change the printing type without Error message in LV8.0.1. LV6.0 worked OK. Info: It is Russian locale system. BR Vladi &nbsp; ...

Print Reports as PDF: Cannot print
I have a procedure to automate .pdf reports. I set the default printer to the pdfwriter driver before running. When the procedure runs, some of the reports get an error: "Cannot print, the file is in use or locked". Any ideas? Win2k and Access v8. This sounds like a problem with PDFWriter, not with Access. Is it possible that you're trying to print to an open file? -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (No private e-mails, please) "Access Guy" <accessguy1010@yahoo.com> wrote in message news:365f86b8.0401090859.66eb2bb@posting.google.com... > I have a procedure to automate .pdf reports. I set the default > printer to the pdfwriter driver before running. When the procedure > runs, some of the reports get an error: "Cannot print, the file is in > use or locked". Any ideas? > Win2k and Access v8. ...

Print preview and print scaling
------=_Part_199_22176463.1208355351678 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hey guys, I'm a little confused about the printing framework. I have a graphic thats been created in A3 size. When I import it into my program I scale it to fit the size of my panel. However I want to print the image off to an A3 printer from my software. I want to be able tp print preview it and see the entire preview of the page and then print it. Problem is I cant seem to get it to look correct. As the same printout object is b...

printing works, pretty print not
Sorry! I thought I was posting to a german news group .... I have Problms with Printing in xemacs. Printing works, with the default Printer. Pretty-Print just says Pinting .. ok, but there is no Printout, and no job in the spool directories. Thanks and regards Florian -- http://www.reichertnet.de >>>>> "Florian" == Florian Reichert <florianr@gmx.de> writes: Florian> Sorry! I thought I was posting to a german news group Florian> .... I have Problms with Printing in xemacs. Printing Florian> works, with the default Pr...

CD printing, Scanning, and printing
I have a need for professional looking one off CD's. I had been using HP lightscribe system to make these CD's Now that HP has dropped that system, and to my knowledge no one currently supports that system on Windows 8.1, I am looking for a new way of creating the CD's. Can some one suggest a printer/scanner that will print to the printable-CD's, that will run on Windows 8.1, and will be around in the future? From: "Keith Nuttle" <Keith_Nuttle@sbcglobal.net> > I have a need for professional looking one off CD's. I had been using >...

Pretty printing the pretty print.
For the first time ever, I have needed to print some code fragments. The default print file command in the GNAT studio produced black and white plain text. Is there something that will produce a more "illuminated" output? -- "Why," said Ford squatting down beside him and shivering, "are you lying face down in the dust?" "It's a very effective way of being wretched," said Marvin. Mike ;-( On 25.09.13 12:36, Mike H wrote: > For the first time ever, I have needed to print some code fragments. The default print file command in the GNAT studio produced black and white plain text. Is there something that will produce a more "illuminated" output? > Emacs has customizable highlighting; buffers can be printed. Thomas Wolf's AdaBrowse, if it helps in this case, http://home.datacomm.ch/t_wolf/tw/ada95/adabrowse/index.html And, shameless plug: http://home.arcor.de/bauhaus/Tools/ASnip/ But the latter hasn't been updated for some time... On Wednesday, September 25, 2013 6:36:52 AM UTC-4, Mike H wrote: > For the first time ever, I have needed to print some code fragments. The default print file command in the GNAT studio produced black and white plain text. Is there something that will produce a more "illuminated" output? Which platform? On Linux GPS printes using a2ps. I use the a2ps "--prologue=color" switch to print the color syntax highlighting. For exampl...

Print to w2k print server
I have an AIX queue setup that points to an w2k print server. The queue there is setup as PCL and point to a Xerox Workcentre Pro 265. When jobs are submitted from Win, they can orient as portrait or landscape. When I submit from AIX, I always get portrait. How can I control the orientation when submitting the job from AIX? This is AIX 5.1. The qconfig entry looks like this. cptest2: device = @acnprint1 up = TRUE host = acnprint1 s_statfilter = /usr/lib/lpd/bsdshort l_statfilter = /usr/lib/lpd/bsdlong rq = ANWP-X265-L2IS @acnprint1: bac...

How to stop print printing spaces?
Hi: I've conjured up the idea of building a hex line editor as a first real Python programming exercise. To begin figuring out how to display a line of data as two-digit hex bytes, I created a hunk of data then printed it: ln = '\x00\x01\xFF 456789abcdef' for i in range(0,15): print '%.2X ' % ord(ln[i]), This prints: 00 01 FF 20 34 35 36 37 38 39 61 62 63 64 65 because print adds a space after each invocation. I only want one space, which I get if I omit the space in the format string above. But this is annoying, since print is doing more than w...

print
I have a problem when I try to print a 2000i2 file (drw) with an inkjet printer ( A3 format ). How I can do? Thanks ...

print
Hello, How do i print the contents of a textbox??? Jeroen If your textbox name is "txtName", then you refer to "txtName.text". For example, if you simply want to copy it on another textbox, "txtResults", you would use the code: txtResults.text = txtName.text If you were just printing it on the form, then you could use Print txtName.text Hope this helps! - Eric A. Johnson "Jeroen van vliet" <info@educationalstays.com> wrote in message news:bkaa8q$f8t$1@reader11.wxs.nl... > Hello, > > How do i print the conten...

Slow Printing with Dlink Print Server
I am using a Dlink DP301-U print server to connect a Canon i950 to my network. It prints fine from all PC's, but is very slow. To give you an idea of how slow it is, it takes approximately 15 minutes to print one A4 size photo. Anyone got any ideas as to what might be wrong, or is this normal for the print server. Lofty ...

Remove All print jobs from a Print Queue
Hi All VMS 7.3.2 What is a quick command to remove/delete all pending print jobs from a VMS print queue? Thank You Bruce brucebrown100@yahoo.com <brucebrown100@yahoo.com> wrote: > VMS 7.3.2 > > What is a quick command to remove/delete all pending print jobs from a > VMS print queue? There is no single command to do do it. The easiest way I have seen is: - Create a dummy queue : $ INIT/QUEUE dummy - Requeue the print jobs: $ ASSIGN/MERGE dummy your_queue - Delete the dummy queue: $ DELETE/QUEUE dummy cu, Martin -- OpenVMS: | Martin Vorlaender | OpenVMS rules! The operating system | work: mv@pdv-systeme.de God runs the | http://www.pdv-systeme.de/users/martinv/ earth simulation on. | home: martin@radiogaga.harz.de <brucebrown100@yahoo.com> wrote in message news:1173278900.794168.276010@p10g2000cwp.googlegroups.com... > Hi All > > VMS 7.3.2 > > What is a quick command to remove/delete all pending print jobs from a > VMS print queue? > $INIT/QUE JUNK $ASSIGN/MERGE JUNK <source queue> $DELETE/QUE JUNK "Malcolm Dunnett" <nothome@spammers.are.scum> wrote in news:45ef6332$1 @flight: > <brucebrown100@yahoo.com> wrote in message > news:1173278900.794168.276010@p10g2000cwp.googlegroups.com... >> Hi All >> >> VMS 7.3.2 >> >> What is a quick command to remove/delete all pending print jobs from a >> VMS print ...

Printing: controlling what pages get printed
I'm using Word 2004 version 11.3.5 on latest OS X 10.4.10. Sometimes I want to print a few of several pages. On the last instance I wanted to print 2 out of 3 pages that were emailed to me as an attachment. I thought I'd just print one at a time so I get just what I need (my toner is getting low). But it printed the last one (the one I didn't need) first. This happens all the time. Is there a way of controlling exactly what gets printed? Or can I just print 1 by 1? I tried but it said 1 of 3 and printed that page 3 first. Or should I just copy and paste the pages I w...

Moving From Screen Printing to Offset Printing?
Hello, I was wondering... I have learned pre-press from a screen printing point of view. I have been doing it for about 2 years. Do I stand a chance if I try to move to offset printing? I really don't know the first thing about it. I guess my questions are like this: 1) Is the knowledge of color separating for screens transferable to offset printing? Are there any major differences? 2) I ask this one half jokingly and half seriously: Do people in the offset industry accept and acknowledge pre-press screen printing skills, or are they all snooty about it? Just curious, I really don't know which one is considered more complicated. 3) Are there any specific skills or things that I should do or learn if I plan on moving from screen printing to offset? I really think it might be time for me to move on. I appreciate any insight or opinions on the matter. Thanks for any help. When I hire someone "New" to prepress (generally someone coming out of school) I'm looking for someone with familiarity in a few programs... quark, photoshop, illustrator...no bad habits and an ability and determination to problem solve. The rest I teach as we go along. Since you have no experience in offset printing go to www.ippocketpal.com/ and order a Pocket Pal. Put out by International Paper for years, it is the primer I recommend to anyone new to printing. It covers the basics and may help you feel and sound more confident in interviews. Good Luck. Lynn In article <...

Is it possible to print [using window.print()] ...
Is it possible to print [using window.print()] a page that has no "title" and "page number" on the top and no "link adress" and "date" on the bottom (to print just a page just as it is...)? (how, thanks!) Bad_Kid said: > >Is it possible to print [using window.print()] a page that has no "title" >and "page number" on the top and no "link adress" and "date" on the bottom >(to print just a page just as it is...)? http://www.jibbering.com/faq/#FAQ4_23 "Bad_Kid" <REMOVEzlocesto_dijete@yah...

window.print with no print dialog prompt
Hi all, Is it possible to do an ie print from javascript that does not bring up the print dialog? I'm in a situation where i need to load a sequence of files into a browser and print all of them without any user interaction. Thanks! ~Steven "Steven" <steven_okpysh@adelphia.net> wrote in message news:74350b0b.0309212109.575eb26@posting.google.com... > Hi all, > > Is it possible to do an ie print from javascript that does not bring > up the print dialog? I'm in a situation where i need to load a > sequence of files into a browser and print all of them ...

Web resources about - To print or not to print - comp.lang.fortran

Print - Wikipedia, the free encyclopedia
Old master print , a product of printmaking, such as an engraving , etching or woodcut , in the European tradition, instead of others (e.g., ...

Print Wikipedia
From Aaaaa! to ZZZap! an exhibition by Michael Mandiberg at Denny Gallery, 261 Broome St. featuring work from the Print Wikipedia series June ...

Old master print - Wikipedia, the free encyclopedia
An old master print is a work of art produced by a printing process within the Western tradition (European or New World). A date of about 1830 ...

Piccolo Automatically Sends Users Prints Of Their Photos On Facebook, Instagram
... Instagram applications and services, as startup Piccolo announced its beta launch, aimed at allowing users to automatically receive printed ...

READ, WEEP, PRINT... - Facebook
The Blacksphere hat geschrieben: READ, WEEP, PRINT AND KEEP! This... Tritt Facebook bei, um dich mit The Blacksphere und anderen Nutzern, die ...

Print Facebook Photos at Target Through Kodak Picture Kiosks — But at What Resolution?
Users looking to make physical copies of their Facebook photos can now print them at Kodak Picture Kiosks at Target retail stores. The kiosks ...

Mediaite.com - News & Opinion - Media: TV, Print, Online, Jobs, Ranking
Mediaite is a news and opinion blog and aggregator for the media industry. Coverage includes newspapers, magazines, online, and television. The ...

The Onion Is Back in Print, for One Issue Only
Print-lovers, rejoice! At a tech festival, no less: The Onion, which stopped publishing a print edition in December 2013, is returning to print ...

"The Internet is a hybrid of television and print. And in order to communicate to a younger audience ...
"... proof of what the writer is saying... If you are trying to communicate to a modern audience, pictures are essential." Said Gawker mogul ...

Trusted Institutions? Be careful... And Always Read The Small Print And Between The Lines
Color of Change I trust. The Congressional Black Caucus PAC... uh, no. Color of Change sent this out yesterday to its members regarding the Senate ...

Resources last updated: 3/16/2016 10:50:25 AM