Thanks XWB. I am browsing Kernel32.f90 now.
That callc and calldll inteface you found look like they will be useful for me.
There are lots of other things in the include folder to Compaq Visual Fortran that don't seem to be documented. Paul Dent
ArkM: You can only place the "VALUE" attribute on an argument WITHIN the subroutine. So it can tell a subroutoine to ACCEPT an argument by value (e.g. from a call from a C program) but you cannot tell a Fortran program that calls a C-program to pass an argument OUT by value.
XWB: Thanks for...
Thanks for all the suggestions above.
I am trying another thing. I got some Pascal code from Ulrich Bangert in Germany that he used in his free program EXGPIB, which is great and I had it working in 5 minutes. The Pascal code gave e a clue how I might proceed in Fortran.
What he does is...
Here is some C code puporting to solve the problem,
but for me it raises more questions than it answers
I add my own comments in caps
#include <stdio.h> // for printf() BECAUSE C DOESN'T HAVE I/O BUILT IN
// FORTRAN DOESN'T NEED THIS...
Here is some 'C' code that puports to do the job, but it elcts more questions than it answers:
I add me commenst in caps tp each line to indicate my understanding or lack thereof of what it does, and end up pruning it down to the barebones:
#include <stdio.h> // for printf() THIS...
I know that works. It will send the letter 'a' to my printer, but not to an instrument which is connected via a USB-GPIB adapter to the USB. To do that, I need to know what to put in place of LPT1.
I know that if I put 'USBD0-4' in place of 'LPT1' the string will get as far as the USB port to...
Yes you are up to speed with me now Norbert. I did post the list of device names that the Compaq manual recites. Then was heartened to find, that by running the winobj.exe program, I could discover a low more device names that are available on a particular machine, that Compaq couldnlt have...
Yes we are talking Fortran
The issue is "What does one write in Fortran to get a reading from a Digital Multimeter, for example."
In automatic test equipment, which is my application, we might want to create a program that, for example, sets up an instrument like a power supply or signal...
C is about as meaningful to me as Urdu.I speak French German Dutch English and Swedish, and Fortran and Assembler fit into my language template, but C does not.
Many programming problems boil down to something being undocumented, so you have to hack it.
I have made a little more progress with...
I have seen a lot of unresolved questions on how to do FORTRAN I/O to a USB device.
All suggested solutions are for your FORTRAN program to call a mass of ugly-C code
that in turn calls a mass of ugly Windows APIs. But it ought to be as simple as
executing a FORTRAN OPEN statement to get a...
I think your problem has been pointed out already above. FORTRAN variables beginning with 'K' are automatically treated as integers unless declared otherwise.
If you want floating point values, write AKROT och AKMOM instead of Krot och Kmom.
Personally I prefer to let the FORTRAN default...
If you have never programmed before, it is good to start with solving the problem with an EXCEL spreadsheet. Your problem is very appropriate to solve on an Excel spread sheet. You jsut have columns labelled T, U, Cd, Z etc along the top, (columsn A, B, C, Din axecl) and then you start with 0.0...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.