Re: Error reporting

new topic     » goto parent     » topic index » view thread      » older message » newer message
ChrisB said...

if category_list[j][1] = data[i][PROD_CATEGORY][1] then

I know I can write some debugging code, but its just a bit of a pain.

Hmmm. I can only make a blind stab at what that code is doing, my (quite arbitrary) guess is comparing "themes", and they be integers. So:

integer category_theme 
integer data_theme 
 
  category_theme = category_list[j][1] 
  data_theme = data[i][PROD_CATEGORY][1] 
  if category_theme = data_theme then 

I claim this adds something very worthwhile to the code: clarity of intent.

Plus there is a quiet little type-check or two than can help.

Plus when that code executes cleanly but something else goes bang several lines later, clear and obvious clues remain in the ex.err.

I have never seen things like that slow anything down and I challenge anyone to prove otherwise.

Of course what I am saying is that all those extra characters should go in permanently, not as "temporary debug code".

I guess I just don't buy the whole "pain" of writing better code.

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu