473,503 Members | 2,082 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

NULL handling

Hello,

While writing an interpreter in C, I have thought of a suggestion for
some new keywords that would help to reduce C application complexity:

- nullable
- notnullable

I have a bunch of sept_get_XXX functions that return a pointer to a
struct, namely sept_Type*.
I have defined 'nullable' and 'notnullable' as empty macros in the
main .H file.

Now I defined my functions prototypes as follows:

inline notnullable sept_get_dict(void);
inline notnullable sept_get_list(void);

And I think I will use these macros in my source tree even for
function arguments, like this:

int my_func(nullable sept_Foo* foo, notnullable gchar* msg);

Why doesn't exist such a functionality in standard C/ or in specific
compilers?
Has my idea a chance to live, or is there no way to create such
keywords?
By the way, I have noticed they tend to make my source code difficult
to read,
but I will strive and continue to use it until I find a better way to
handle such informations.

Regards,
Stéphane A.

Oct 25 '07 #1
2 1540
st************@yahoo.fr wrote:

<repeat post snipped>

What was wrong with the responses to your first post of this question?

Oct 25 '07 #2
santosh wrote:
st************@yahoo.fr wrote:

<repeat post snipped>

What was wrong with the responses to your first post of this
question?
As seen here there was only one, accompanied by two more from
plonkees that were never allowed on my system. :-)

Of course this still doesn't excuse the impatient re-entry.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Oct 25 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
332
by: Brendan McLoughlin | last post by:
Hi, I am looking for opinions and alternatives for handling null values in a data object which reads a record from a database table. This object will have properties which will be populated...
4
16180
by: James Fisher | last post by:
How are people handling NULL values for value types. Descriptions of problem Say you have a typical method with the signature: public int InsertPerson(string firstName, string lastName, int...
1
2593
by: DKode | last post by:
I find myself writing repetitive functions for handling null values from my DB like so: Private Function SetDateNull(ByVal p_date As Object) As Date If (TypeOf (p_date) Is System.DBNull) Then...
1
2064
by: Michel Walsh | last post by:
Hi, Just get my hand on "Data Binding Windows Forms 2.0 Programming Smart Client Data Applications with .Net", by Brian Noyes (Addison Wesley), with a nice illustration on using generated...
17
4492
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
18
2950
by: Denis Petronenko | last post by:
Hello, in the following code i have segmentaion fault instead of exception. Why? What i must to do to catch exceptions in such situation? Used compiler: gcc version 3.3.6 (Debian 1:3.3.6-13) ...
5
2622
by: AAJ | last post by:
Hi Does anyone know of any good publically available set of standards for managing dates when dealing with a database server (in my case SQL Server 2000 and c# VS2005). At the moment, if I...
22
16884
by: dvestal | last post by:
Suppose I have this: class C { public delegate void MyEventHandler(); public event MyEventHandler MyEvent; public void foo() { MyEvent(); // NullReferenceException? } }
4
1402
by: robin9876 | last post by:
Instead of .Net showing an Object reference not set to an instance of an object error message. Is their a method of handling these messages and displaying a more user friendly message and recording...
17
6326
by: Tony Jackson | last post by:
Hi I'm quite new to C programming - I have more of a Java background: maybe someone here can advise me. I'm nearly finishing a little program but it has some hard-to-find bugs that basically...
0
7204
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7342
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6998
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7464
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5018
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4680
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
1
741
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
391
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.