Help: VAX C problem
linwood.d.johnson
linwood at cbnewsk.att.com
Sun Mar 31 02:18:54 AEST 1991
In article <11697.27f376d8 at zeus.unomaha.edu> kkrueger at zeus.unomaha.edu (Kurt Krueger) writes:
>I wrote and compiled my program on my Amiga, and it runs fine;
>however, I can't get it to run on our VAX. I know next to nothing about C
>programming on the VAX (the truth is, I know little about C, as well), and I
>would be happy if someone could point out my folly. The program is as follows:
>
>extern int atoi();
>float size, time;
>int block, mins, secs;
>
>main (argc, argv)
>
>int argc;
>char *argv[];
>
>{
> int result, value();
> printf ("%s", argv[1]);
> block = value(argv[2]);
> size = block / 2;
> time = size / 0.2227;
> mins = time / 60;
> secs = time - (mins * 60);
> printf ("\t\t%d\t%d\n", mins, secs);
>}
>
>int value(number1)
>char *number1;
>{
> int convblock = atoi(number1);
******
Wouldn't you want this function to return something since you are
using the return value.
I think something like: return( convblock);
will do the trick.
>}
--
| Linwood D. Johnson | linwood at ihlpf.att.com |
| AT&T Bell Labs, 1000 E. Warrenville Rd., Naperville, IL 60566 |
| Disclaimer: Opinions expressed here are mine and mine only. |
| Besides, who else would want them? |
More information about the Comp.lang.c
mailing list