I'm out of practice with C, but shouldn't
viScanf(vi, %t, buf);
be
viScanf(vi, %t, buf);
[I'm not a language wizard.]
It looks OK to me. Arrays are passed by pointer.
buf is the same as buf[0]
The compiler should complain if it is wrong.
A quick google found examples without the .
Hal Murray wrote:
I'm out of practice with C, but shouldn't
viScanf(vi, %t, buf);
be
viScanf(vi, %t, buf);
[I'm not a language wizard.]
It looks OK to me. Arrays are passed by pointer.
buf is the same as buf[0]
The compiler should complain if it is wrong.
A quick google found examples
If buf is defined as an array (eg. char buf[100];)
its name is a constant that points to the start of the
array. You can write it either as buf, or buf.
-Chuck Harris
Brent Gordon wrote:
I'm out of practice with C, but shouldn't
viScanf(vi, %t, buf);
be
viScanf(vi, %t, buf);
Brent
If buf is defined as an array (eg. char buf[100];) its name is a
constant that points to the start of the array. You can write it
either as buf, or buf.
Not quite. You need buf[0]
buf is a pointer to the array. (first element)
buf is a pointer to that pointer.
buf[0] is a pointer to
Not quite. You need buf[0]
buf is a pointer to the array. (first element)
buf is a pointer to that pointer.
buf[0] is a pointer to the first element of the array.
Hal, try the following with your C compiler...
#include stdio.h
void main ()
{
char buf[100] = { 3,1,4,1,5 };
Hal Murray wrote:
If buf is defined as an array (eg. char buf[100];) its name is a
constant that points to the start of the array. You can write it
either as buf, or buf.
Not quite. You need buf[0]
buf is a pointer to the array. (first element)
buf is a pointer to that pointer.
At 04:46 PM 10/24/2009, Tom Van Baak wrote...
Not quite. You need buf[0]
buf is a pointer to the array. (first element)
buf is a pointer to that pointer.
buf[0] is a pointer to the first element of the array.
Hal, try the following with your C compiler...
BASIC is _so_ much easier. :-)
t...@leapsecond.com said:
Hal, try the following with your C compiler...
...
mag...@rubidium.dyndns.org said:
Not quite.
...
Argh/blush. Sigh.
Thanks for the correction, and apologies for cluttering up the list with
bogus info.
I fished out my old copy of Andrew Koenig's C Traps and
I'm still trying to get the HP5328B counter to work with GPIB. I don't have
any problems talking, however I can't receive data.
I think the basic (HP/Agilent) hardware/software are ok, with a similar type
of program I am able to send/receive to a 34401 Digital Multimeter.
It seems like it
I'm out of practice with C, but shouldn't
viScanf(vi, %t, buf);
be
viScanf(vi, %t, buf);
Brent
Jerome Peters wrote:
I'm still trying to get the HP5328B counter to work with GPIB. I don't have any
problems talking, however I can't receive data.
I think the basic (HP/Agilent)
10 matches
Mail list logo