Your opinion: CVF Samples

Your opinion: CVF Samples

Community Admin's picture

After an extended back-and-forth with Jugoslav about passing and constructing VARIANTS and SAFEARRAYS in C++/FORTRAN mixed language programs, I came to the conclusion thtat the samples provided by CVF are a little bit lacking. The relevant examples show you to use VARIANTS and SAFEARRAYS in FORTRAN, but surely the primary application for these data structures is in mixed language programming? So why don't we get any examples of their use in a mixed language environment? Or am I looking at the wrong examples? What do you guys think? (I'm actually specifically interested in SAFEARRAYS of type VT_VARIANT that contain arrays of character data - I'm having great difficulty constructing one!)

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Well I dont l know what to say about your specific issue, but I have looked at the samples extensively. I think they are the first line of support (besides the documentation). While there are some great things in there, many are strange and uninstructive @least on the first 5 readings. For example the COM server stuff can include a super simple example of a simple subroutine packaged in a server. Instead of the complicated reverse polish vfadder. The other ones I can;t even figure out after 3-4 readings.

The biggest shortcoming is perhaps the lack of commentary inside the sample codes.

With all this still they are VERY valuable, and they can't put in enough.

Another thing related to this, is something I have asked Steve about from a long time ago (since the last version msg board) is a code repository where people can share their work. That is by default a good source of sample codes. Alas, I don;t know what the problem is with the idea...

Tim

Steve Lionel (Intel)'s picture

Good samples are the hardest thing to write. For those of us who are close to the development, what may seem obvious and intuitive to us may be clear as mud to typical users. The sample I worked hardest on was the current FORPRINT - I tried to make it easy to follow and clearly documented.

Many of the samples were inherited from Microsoft, and most of these have not been touched much, unless we discovered problems. (I did a lot with the OpenGL Puzzle sample.) If you find a problem with a sample, send us revisions or suggestions at vf-support@compaq.com.

As for a code repository, I have an idea of how we can do that using the new Intel forum I'm working on getting set up. It supports attachments, so I think that would be a good way to go. I wish I could tell you when that will go live - I wanted it to be live in October! But progress is being made...

Steve

Steve
Community Admin's picture

Steve - a code repository sounds like a great idea. Have you had any thoughts on how to do it? Would it be 'moderated' for example? So we end up with one really good example of how to do something rather than 20 not so good ones? An it would just be code samples yes ? I 've been to message boards that contain vast quantities of excellent, even professional quality code samples, that are a pain in the butt to find! :)

Steve Lionel (Intel)'s picture

The idea I have in mind is a separate forum section for examples, which would be moderated. We'd probably have to come up with some guidelines for titles and keywords to make things easy to find. You'd be able to search just the example section.

Steve

Steve

A moderated sample code section is quite a combo. I have never seen anything like it, mostly b-cuz it is a lot of work for the moderator.

Even if you did this, I still like to see a (call it the "pile") where people just put in stuff, without hinderance. For example Compiled LIBs/Mods DLLs etc without having to reveal the source necesarily.

BTW, here is a open repository for all compilers:
http://www.nag.com/nagware/Examples.asp

Tim

Steve Lionel (Intel)'s picture

I would not permit samples that did not include source. If you wanted to provide that on your own site, fine. The idea of samples is to see how things are done, not just to provide libraries.

Steve

Steve

Login to leave a comment.