Returning user defined data types

17 views
Skip to first unread message

mayank gupta

unread,
Apr 15, 2012, 9:28:22 PM4/15/12
to clip...@googlegroups.com
Is there any way to return user defined data types (like structures) with user defined functions in CLIPS.
Returning unknown data types supports only CLIPS data types. Or am I missing something?

Lode Hoste

unread,
Apr 16, 2012, 4:44:52 AM4/16/12
to clip...@googlegroups.com
Hi Mayank,

I think you missed something: a - external address.
Allows you to return (void *) pointers.

/* Copy from extnfunc.h. CLIPS Version 6.24 07/01/05 */
/* Return types are: */
/* a - external address */
/* b - boolean integer (converted to symbol) */
/* c - character (converted to symbol) */
/* d - double precision float */
/* f - single precision float (converted to double) */
/* g - long long integer */
/* i - integer (converted to long long integer) */
/* j - unknown (symbol, string, */
/* or instance name by convention) */
/* k - unknown (symbol or string by convention) */
/* l - long integer (converted to long long integer) */
/* m - unknown (multifield by convention) */
/* n - unknown (integer or float by convention) */
/* o - instance name */
/* s - string */
/* u - unknown */
/* v - void */
/* w - symbol */
/* x - instance address */

2012/4/16 mayank gupta <sharpsp...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups
> "CLIPSESG" group.
> To post to this group, send email to CLIP...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/CLIPSESG?hl=en
>
> --> IF YOU NO LONGER WANT TO RECEIVE EMAIL <--
> Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
> Click on "Edit my membership" link.
> Select the "No Email" radio button.
> Click the "Save these settings" button.
>
> --> IF YOU WANT TO UNSUBSCRIBE <--
> Visit this group at http://groups.google.com/group/CLIPSESG?hl=en
> Sign in
> Click on "Edit my membership" link.
> Click the "Unsubscribe" button.
> Note: This appears to be the most reliable way to unsubscribe
>
> Alternately, send email to CLIPSESG-u...@googlegroups.com. You will
> receive an email which you must respond to as well to unsubscribe. Clicking
> the link mentioned in the unsubscribe reply does not appear to work
> reliably.

Reply all
Reply to author
Forward
0 new messages