The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Exist (name) for macros wrong value returned
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 10/22/2003 :  05:01:31 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

the exist function returns 8 for macros not 6 as stated in the help. This applies to all versions including 7.5.
Please can you clarify/confirm what the exist(name) function returns?

FYI : I'm using this to check if project specific macros are to be run in a generic (cross project) application.

Cheers,

pete

cpyang

USA
1406 Posts

Posted - 10/22/2003 :  06:24:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You are right, as can be seen in oc_const.h with Origin C by searching for EXIST_MACRO

#define EXIST_MACRO 8

This was changed in 1995 from 6 to 8 and the documentation was not
updated.


CP


Go to Top of Page

peter.cook

UK
356 Posts

Posted - 10/22/2003 :  06:38:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi CP,

Thanks for reply. browsing through 0c_const.h I see

#define EXIST_NONE      0
#define EXIST_DATA 1
#define EXIST_WKS 2
#define EXIST_PLOT 3
#define EXIST_VAR 4
#define EXIST_MATRIX 5
#define EXIST_TOOLBAR 7
#define EXIST_MACRO 8
#define EXIST_PLOT_3D 6
#define EXIST_NOTES 9
#define EXIST_ACTIVE 10
#define EXIST_LAYOUT 11
#define EXIST_EXTERN_WKS 12
#define EXIST_PAGE 13


all of which I think work with exist(name) even to 6.1

Cheers,

Pete

(so just a matter of updating help files)

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000