From: Catonano <catonano@gmail.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-user@gnu.org
Subject: Re: unsigned-int
Date: Thu, 22 Jun 2017 21:33:31 +0200 [thread overview]
Message-ID: <CAJ98PDyDicSvXWDpo0q3--u-xSp3_hsT0yfNwabTw0HuZbEc3Q@mail.gmail.com> (raw)
In-Reply-To: <CAJ98PDzYQoaifaa4=-Cyp=XOK_tf-c=OZLpwSdBDLFqyq5guMA@mail.gmail.com>
2017-06-22 21:13 GMT+02:00 Catonano <catonano@gmail.com>:
>
>
> I apologize if my questions are naive.
> I wrote my last scrap of C code in about 2004 and it never was my thing
> Also the manual is a great reference but not a great tutorial and I'm not
a great reader, probably.
Something that is concerning me is that in the example a "rows" variable
and a "columns" variable get declared as
unsigned int rows;
unsigned short columns;
and then they get passed as arguments to freexl_worksheet_dimensions as
&rows, &columns
like this
ret = freexl_worksheet_dimensions (handle, &rows, &columns);
In scheme I am NOT declaring anything because I don't now how to
I am just passing void pointers to freexl_worksheet_dimensions
But when you declare a variable of some type, some memory gets reserved for
the value to be contained in that variable, right ?
But I am passing void pointers here, so is any memory region being reserved
? I'm afraid not
That might be the reason why I get garbage rows numbers. Because I am
making it read some random memory region that has been already reserved for
something else, that's already populated with God knows what and I am
making it interpreting that stuff as numbers.
I don't know, I'm speaking freely, here, this is a wild hypothesis
I can't make so much sense of this code
Please bear with me :-/
Thanks in advance
next prev parent reply other threads:[~2017-06-22 19:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-22 9:42 unsigned-int Catonano
2017-06-22 9:56 ` unsigned-int Catonano
2017-06-22 16:20 ` unsigned-int Mark H Weaver
2017-06-22 19:13 ` unsigned-int Catonano
2017-06-22 19:33 ` Catonano [this message]
2017-06-22 19:55 ` unsigned-int Catonano
2017-06-22 20:01 ` unsigned-int Catonano
2017-06-22 20:53 ` unsigned-int Catonano
2017-06-23 12:37 ` unsigned-int Mark H Weaver
2017-06-23 12:16 ` unsigned-int Mark H Weaver
2017-06-24 9:17 ` unsigned-int Catonano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJ98PDyDicSvXWDpo0q3--u-xSp3_hsT0yfNwabTw0HuZbEc3Q@mail.gmail.com \
--to=catonano@gmail.com \
--cc=guile-user@gnu.org \
--cc=mhw@netris.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).