×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Just an Observation

Just an Observation

Just an Observation

(OP)
Hi, Contributors (& Lurkers),

When I google a problem I'm having, I usually find lots of suggestions not solving the problem with extraneous information in writing or video, made by people obviously trying to show off. Haven't we all?

I find tons of misinformation on Windows, politics, car repairs and probably just about anything.

My point here is I find this forum a refreshing reprieve from that. I appreciate and learn from the contributions, although I can't always understand them, but I trust posters like Mike Lewis' explanations to be simple and accurate.

So let's avoid flame wars (however small), ok?

Steve

RE: Just an Observation

Steve,

I fully agree. I like the way we communicate here and I know from other forums that it can be quite different too. I come here nearly daily for news and updates.

I only visit 2 other forums nearly daily: foxite.com an diyaudio.com. Both with a similar helpful and understanding commitment.

Regards, Gerrit

RE: Just an Observation

Hi Steve!!! I must agree, all answers given here are true and really solved and gave answers to every queries especially Mike Lewis, Mark, Chris, Nigel, Griff and others... They always help solve the problem... actually i am now almost at finish of my application because of all the people in this forum.. Im so thankful that i am a member.... God bless everyone...

RE: Just an Observation

When a person cannot comment on a perceived inaccuracy - in a highly technical forum and gets accused of bullying for it, all I want to do is take my 40+ years of experience and go away.

Mike Yearwood - Former FoxPro MVP

RE: Just an Observation

MikeY

Everyone here tries their best to help. If you have a better solution it is, of course, welcome and appreciated but the management here will remove any ad-hominem attacks.

Chriss (and Olaf before him) makes an extraordinary contribution here (has helped me personally many a time and, if he's not self-employed, i just hope his boss never sees how much effort he puts in here) and you may find a to & fro on the specific technical issue beneficial to everyone. At worst you may have to politely agree to disagree.

I too have been programming for over 40 years (a mere 25 in foxpro) but learn something new here everyday.

n

RE: Just an Observation

Steve,

Thank you for your kind words. You singled me out by name, but of course the praise must go to all the regulars here who are tireless in their help. Nigel mentioned Olaf/Chriss, who has gone beyond the call of duty so often over the years. I won't try to mention any other names for fear that I wil forget some, which is not my intention. But we all know who they are.

Tek-Tips is now the only technical forum that I visit regularly. There have been others over the years (and I go all the way back to Compuserve days), but they have mostly fallen way.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Just an Observation

(OP)
Nigel (and others),,

I too can add around 40 years of programming and I too add to my relatively limited knowledge each day. In fact sometimes I have to wonder if it took me those 40 years to gain my 6 months of knowledge. bigears

Steve

RE: Just an Observation

No one is perfect. They cannot accept getting called out. I always prove my points with evidence. I have no time to waste on people who opine that I am bullying them.

Mike Yearwood - Former FoxPro MVP

RE: Just an Observation

(OP)
Then don't.

RE: Just an Observation

I cannot know in advance who thinks they are good, nor what they know. I've had lots of disagreements with supposed experts and proven them incorrect but they choose to rely on opinion vs evidence. If someone's idea of how something works is wrong or missing, I'll correct it. Griff just found out about mdot. The point is even with many years of experience no one knows everything. We will only learn by doing, without having to worry about someone's "feelings".

Mike Yearwood - Former FoxPro MVP

RE: Just an Observation

I didn't just find out about mdot.

sad shades

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Just an Observation

I am glad to see also in this Thread confirmed what I today wrote Mike Yearwoodin Thread:

Import or Append what else could work for a big comma-delimited file to be transferred into *.dbf ?

Klaus

Peace worldwide - it starts here...

RE: Just an Observation

Griff. You asked Mike Lewis "Mike, why does it do that not this?". The answer was because there was a missing mdot. You asked because at that moment, you were unaware of the effect of mdot on the code.

Mike Yearwood - Former FoxPro MVP

RE: Just an Observation

No, I was asking so Mike would elucidate for everyone, I have been using mdot for decades - check my earliest FAQ...

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Just an Observation

Can we please go back to limiting this forum to technical discussion and helping each other (specifically my issue with grouping listviews )

No one is being paid per accepted answer; no one i hope has their sense of self-worth tied up with 'winning' discussions here. Many of us will have had teenage children so should be used to having sage advice ignored. We also have to bear in mind that as well as many contributors not having english as a first language there are many cultural differences that may make some appear overly deferential and others overly assertive; and famously 'tone' can appear quite different to that intended.

Let it go.

n

RE: Just an Observation

(OP)

Quote (Mike Y.)

RETURN from inside a WITH...ENDWITH is a further example of a thing we must avoid because it can crash

With all due R E S P E C T to your knowledge, I have never heard that before. Is the same true if one uses THISFORM to preface the properties instead of the WITH..ENDWITH construct? Just curious.

Steve

RE: Just an Observation

Quote (Steve)

Is the same true if one uses THISFORM to preface the properties instead of the WITH..ENDWITH construct? Just curious.

No. Exiting any kind of loop or construct with RETURN is considered bad programming practice in some circles. Or even placing a RETURN in the body of a function or procedure. (And this is not just a VFP thing.) But it is perfectly legal and will not in itself cause a crash (in VFP).

But exiting a WITH ... ENDWITH construct with a RETURN does cause problems, including C5 errors. I think this is quite a well-known issue, although I don't recall seeing it officially documented anywhere. Using THISFORM (or any other object reference) in place of WITH ... ENDWITH is not a problem.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Just an Observation

I did not know about the WITH..ENDWITH issue, but that is probably because I do not normally use it happy shades

I am a bit retentive about functions only having one exit (return) though, and I try to write DO WHILE.. ENDDO loops where the condition
includes a control to allow a 'proper' exit, same with FOR... NEXT loops

In fact, I don't even use ENDFUNC for the most part, because with just one RETURN the function is over when it's called and the next lines in
any prg file are going to be starting a new function or procedure.

I seem to remember some variation of dBase had a rule that any call to a function had to be tested or assigned to something, so you would end up
with - would that have been Clipper?

CODE --> like

m.void = MyFunction(m.Param1, m.Paramm2) 

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Just an Observation

Griff, no I don't think that was Clipper. As far as I remember, Clipper allowed you to call a function without picking up its returned value, just as in VFP. I don't think it applied in dBASE either, although given the current state of my mental faculties, I could be wrong in both cases.

Of course, another place where you must not use RETURN to exit a construct is in TRY / CATCH /ENDTRY.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Just an Observation

(OP)

Quote (Mike L)

another place where you must not use RETURN to exit a construct is in TRY / CATCH /ENDTRY.

Mike, I learned about the RETURN inside TRY..ENDTRY by bad experience. I've been using RETURN inside WITH..ENDWITH for years and never had a problem with it (that I know of). I'll reconsider.

BTW Thanks Chris(s).bigsmile
Steve

RE: Just an Observation

Mike, do you think it might have been Foxbase or FoxPro? It has to be between the late eighties and early nineties

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Just an Observation

Griff, this is really taxing my memory.

As far as I remember, Foxbase (and early versions of dBASE) didn't have user-defined functions. You could create a procedure, which could only be executed with DO. And there were built-in functions, like LEFT() and VAL(), but they always returned a value. So the idea of calling them without using the returned value never arose.

I hope someone will correct me if I am wrong about this.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Just an Observation

Sorry, shouldn't be taxing you so early in the week, probably turn out to be Delphi!

Regards

Griff
Keep Smileing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

RE: Just an Observation

Hello,

just on with endwith

I never use a return within with endwith
And i rarely use with endwith because I am too lazy to remember propertys and object names and let intellisense do it which seems not to work if you use with endwith.

And found in my "if anything fails folder" : https://doughennig.blogspot.com/2006/04/dont-retur...
(in this folder there is also something about HP printer drivers, yes its an old folder smile )

Regards
tom

RE: Just an Observation

There is no central aggregation of knowledge, nor standards to refer to. Therefore there should be no dismissal of any input or correction of anything unclear in any way. I hate being told what I can and cannot say. There are many people who love the WITH...ENDWITH syntax, yet they don't know about the RETURN causing a c00005. WITH...ENDWITH is no faster or better than...

loObject=something.somewhere.someplace && a deep hierarchy.
loObject.prop1=1
loObject.prop2=2

Totally "premature optimization". I try to promote the best, safest and fastest techniques. Having anyone repeatedly state their "preference" for years and years is not a friendly disagreement, it is targetted harassment.

I wrote about returning from with endwith. Who is censoring my statements? A loss of useful information. Imagine trying to help someone and get told off because they don't like how you help. There are jerks in all the forums and no one does anything to them. Another gatekeeper mentality which is another reason I've grown so bitter. I start out expecting to have to stand up for myself since no one else will.

Mike Yearwood - Former FoxPro MVP

RE: Just an Observation

Tom, thanks for pointing out Doug Hennigs blog post. Now I also know where I read about this.

Chriss

RE: Just an Observation

I wrote the with...endwith observations.

Mike Yearwood - Former FoxPro MVP

RE: Just an Observation

The whole problem trying to be solved by the rule of only one return per routine is to ensure the environment can be reset / cleaned up at the end. In MaxFrame we had custom objects that would remember settings and revert them when the procedure of method ended. I'm supposed to make MaxFrame open source, but certain people make me wonder why I'd bother.

Mike Yearwood - Former FoxPro MVP

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close