Discussion
Topics
Last Day
Last Week
Tree View

Search
New Messages
Keyword Search

Help
Getting Started
Formatting
Troubleshooting
Program Credits

Utilities
Edit Profile
Administration
Contact

 
forum - discussion board
- about - downloads - registration - forum - misc - home - © 1996-99 GWD Text Editor

Calling a GWD C Script from within a GWD C Script?

GWD Text Editor Forum: Technical Support: Calling a GWD C Script from within a GWD C Script?
Top of pagePrevious messageNext messageBottom of pageLink to this message  By Anonymous on Wednesday, June 12, 2002 - 11:55 pm:

Is this possible? If so, how would one go about it?

FYI, I'm still using GWD Ver. 2.51.


Top of pagePrevious messageNext messageBottom of pageLink to this message  By Vedran Gaco (Vgaco) on Thursday, June 13, 2002 - 03:16 am:

Unfortunately, only by using #include "script.c" directive and then calling
functions from that script. For example:

MyScript1.c:
-------------------------------------------
#define MYSCRIPT1_C

#include "MyScript2.h"

int main(int argc, char *argv[])
{
   // call MyScript2 function
   Script2_Main(argc argv);

   return 0;
}

MyScript2.c:
-------------------------------------------

int Script2_Main(int argc, char *argv[]);

#ifndef MYSCRIPT1_C

int main(int argc, char *argv[])
{
   return Script2_Main(argc argv);
}

#endif

int Script2_Main(int argc, char *argv[])
{
   printf("Script 2 code");
   return 0;
}


Add a Message


This is a public posting area. If you do not have an account, enter your full name into the "Username" box and leave the "Password" box empty. Your e-mail address is optional.
Username:  
Password:
E-mail:


- about - downloads - registration - forum - misc - home - © 1996-99 GWD Text Editor