[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] C IMPLEMENTATION MODULE?
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] C IMPLEMENTATION MODULE? |
Date: |
Wed, 06 Jan 2010 00:10:00 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
Hi Martin,
sorry I didn't see this email until now..
Martin KalbfuĆ <address@hidden> writes:
> Oh. I forgot to look at the examples. While studying, I realized that
> there's a throw function inside the system module. It looks like the
> examples uses this function. I'm currently using the ISO exceptions,
> with an exception number, and an additional error message. Can I throw
> such an exception from C?
>
> maybe a struct like
>
> typedef struct
> {
> int exception_number;
> char *exception_msg;
> }EXCEPTION;
>
> or something similar?
yes M2 can throw an exception which can be caught by C++ and visa
versa.
> I assume a PACKEDSET is simply a number.
yes PACKEDSET is no different to SET in gnu m2.
> TYPE PACKEDSET OF [0..31];
>
> should represent an int32_t at the C side.
true
> And
>
> TYPE PACKEDSET OF [0..7];
>
> should represent an int8_t.
>
> Is this correct?
correct!
>> yes you are right - it does need improving. A section on how to do
>> this would be useful
I'll try can capture the info in the last few emails and place it into
the gm2 documentation,
regards,
Gaius
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Gm2] C IMPLEMENTATION MODULE?,
Gaius Mulley <=