--- "David F. Liberatore" <bluetick16@...> wrote:
> Operating system Windows 2000
>
>
> Ch
> Standard edition, version 5.0.1.12231
> (C) Copyright 2001-2005 SoftIntegration, Inc.
> http://www.softintegration.com
> :/> char *szDave="the cat"
> :/> cout<<szDave<<endl;
> the cat
> :/> //this causes the screen to close
> :/> delete[] szDave
> :/> szDave
>
> :/> //try to copy a new string to deleted pointer to variable
> :/> strcpy(szDave,"string");//if press enter will close ch program
>
>
> at this point the program ch will simply close
>
> Of course this will cause a problem in a regular c program
Right. Once the memory gets messed up, it is an undefined behaviour in
C/C++. The program may crash.
when you define
char *szDave="the cat"
szDave is pointing to a string of static type
You should not delete the static data.
It is not a legal C/C++ code.
then, you copy the 'string' to a static data memory which had been
deleted already. This is not valid C/C++ code. It might crash even
for C/C++ program. Under ch shell, it will exit.
You may visit http://groups.yahoo.com/group/ch_language/
for the discussion in the future.
Tech suport
Hi Ron,
The project looks great and should be very useful.
The contents of the tutorial appear well organized.
I am interested in helping you out.
Sqlite should be easy to integrate into Ch with Ch SDK.
You may take a look at the source code for Ch unixODBC at
http://www.softintegration.com/products/toolkit/odbc/
I can help you out on creating Ch SQLite.
As far as CGI is concerned, Ch has a toolkit called Ch CGI
available at http://www.softintegration.com/products/toolkit/cgi/
The APIs of Ch CGI are similar to ASP and JSP.
Regards,
Bo
--- In ch_language@yahoogroups.com, Ron Weidner <xecronix@y...> wrote:
> I'm considering writing a large programming tutorial
> using CH as the programming language. This will be an
> intermediate level tutorial that will conclude by
> building a CGI Message Board from using the tools and
> practices developed in the preceding chapters. The
> project would begin by writing a hashtable in order to
> get familiar with the CH interpreter and then move
> into basic CGI programming.
>
> During the exploration of CGI, the tutorial will
> construct, from scratch, a minimal CGI programming
> library to be compiled into a shared object (dll) and
> used in the rest of the project. Once the reader has
> accomplished using his own shared object in a program,
> it is hoped that he could explore other programming
> opportunities by wrapping someone else's *.so.With
> that in mind, the next part of the tutorial would
> cover using Sqlite.
>
> As the tutorial begins to wind down, the reader would
> be introduced to developing his own CGI templating
> system. At this point, the reader should have a very
> through understanding of the C, CH, CGI, and related
> technologies. Polishing his new skill set, the
> reader could further explore project management
> through the creation of a lightweight on-line message
> board.
>
> I'm considering this as an open source project. As
> such, I'm asking if there are any volunteers willing
> to help. I'm especially looking for help with
> Chapters 10, 11, and 12 as outlined below but any help
> would be appreciated.
>
>
> ** Working with CH
> Chapter - 1 Setting up (CH, CGI, Apache)
> Chapter - 2 Dynamic Hashtable lib
>
> ** Beginning CGI With CH
> Chapter - 3 Sending Text Files
> Chapter - 4 HTTP Headers
> Chapter - 5 Cookies
> Chapter - 6 Get (query string)
> Chapter - 7 Post (form data)
> Chapter - 8 Post (multi-part)
>
> ** Creating The lib
> Chapter - 9 Making an .so with gcc
> Chapter - 10 Wrapping the .so for use with CH
> Chapter - 11 Using the .so in an application
>
> ** Data enable
> Chapter - 12 Integrating Sqlite
> Chapter - 13 Creating a Databases and Tables
> Chapter - 14 Inserting a Record
> Chapter - 15 Reading a record/record set
> Chapter - 16 Database Changes with Update and Delete
> Chapter - 17 Database abstraction layer
>
> ** CGI Templates
> Chapter - 18 Designing A Template System
> Chapter - 19 Parsing Templates
> Chapter - 20 Implementing Callbacks
>
> ** Practical Application
> Chapter - 21 Building a discussion forum
>
>
> Ronald Weidner
> http://www.techport80.com
> PHP Software developer for hire.
>
>
>
> __________________________________
> Discover Yahoo!
> Have fun online with music videos, cool games, IM and more. Check
it out!
> http://discover.yahoo.com/online.html
I'm considering writing a large programming tutorial
using CH as the programming language. This will be an
intermediate level tutorial that will conclude by
building a CGI Message Board from using the tools and
practices developed in the preceding chapters. The
project would begin by writing a hashtable in order to
get familiar with the CH interpreter and then move
into basic CGI programming.
During the exploration of CGI, the tutorial will
construct, from scratch, a minimal CGI programming
library to be compiled into a shared object (dll) and
used in the rest of the project. Once the reader has
accomplished using his own shared object in a program,
it is hoped that he could explore other programming
opportunities by wrapping someone else's *.so.With
that in mind, the next part of the tutorial would
cover using Sqlite.
As the tutorial begins to wind down, the reader would
be introduced to developing his own CGI templating
system. At this point, the reader should have a very
through understanding of the C, CH, CGI, and related
technologies. Polishing his new skill set, the
reader could further explore project management
through the creation of a lightweight on-line message
board.
I'm considering this as an open source project. As
such, I'm asking if there are any volunteers willing
to help. I'm especially looking for help with
Chapters 10, 11, and 12 as outlined below but any help
would be appreciated.
** Working with CH
Chapter - 1 Setting up (CH, CGI, Apache)
Chapter - 2 Dynamic Hashtable lib
** Beginning CGI With CH
Chapter - 3 Sending Text Files
Chapter - 4 HTTP Headers
Chapter - 5 Cookies
Chapter - 6 Get (query string)
Chapter - 7 Post (form data)
Chapter - 8 Post (multi-part)
** Creating The lib
Chapter - 9 Making an .so with gcc
Chapter - 10 Wrapping the .so for use with CH
Chapter - 11 Using the .so in an application
** Data enable
Chapter - 12 Integrating Sqlite
Chapter - 13 Creating a Databases and Tables
Chapter - 14 Inserting a Record
Chapter - 15 Reading a record/record set
Chapter - 16 Database Changes with Update and Delete
Chapter - 17 Database abstraction layer
** CGI Templates
Chapter - 18 Designing A Template System
Chapter - 19 Parsing Templates
Chapter - 20 Implementing Callbacks
** Practical Application
Chapter - 21 Building a discussion forum
Ronald Weidner
http://www.techport80.com
PHP Software developer for hire.
__________________________________
Discover Yahoo!
Have fun online with music videos, cool games, IM and more. Check it out!
http://discover.yahoo.com/online.html
--- xecronix <xecronix@...> wrote:
> I'm interested in CH as a way to quickly write, test, and debug C
> programs before compiling to a finished product. So, my question is
> how feasible is it to do my writing/testing using CH then compiling
> using GCC?
All of your C code can run in Ch and be compiled in GCC.
Ch is a just superset of C.
All C code can run in Ch.
Like many C compilers with extension to ISO C, Ch also has some
extensions over ISO C for convenient scripting which might not be portable.
>
> Oh... and can CH use shared objects (dlls)
You can use Ch SDK to call the functions in DLLs. Ch SDK is
a part of Ch. That is how
OpenGL, ODBC, Win32, GTK+ works in Ch.
-W
> Ron_W
>
>
>
>
>
> Ch - One Language for All (tm)
> Yahoo! Groups Links
>
>
>
>
>
>
>
I'm interested in CH as a way to quickly write, test, and debug C
programs before compiling to a finished product. So, my question is
how feasible is it to do my writing/testing using CH then compiling
using GCC?
Oh... and can CH use shared objects (dlls)
Ron_W
--- pajislav007 <pajislav@...> wrote:
> Hi,
> I tried to embed Ch in our (huge) company project, but there were
> some
> errors during linking due to conflicts of ambiguous definitions of
> some "basic" functions (see below) in your library (embedch.lib) and
> ours. Before, we've tried another interpreter called EiC, those
> problems were solved when compiling its source library code as
> multithreaded (same as our project). Is this the problem and how can
> we solve it? Below is the output of MSVC6:
>
> msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in
> libcmtd.lib(crt0dat.obj)
> msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in
> libcmtd.lib(dbgheap.obj)
> msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in
> libcmtd.lib(dbgheap.obj)
To use multi threading, you need to upgrade your compiler VC 6.0 to
VC++.NET. You need thread-safe library from the latest VC compiler.
If you don't use multithreading, it is not required
to upgrade your compiler.
Please make sure option
/MD is used during compilation
Best regards,
Tech support
>
> etc.
>
>
>
>
Hi,
I tried to embed Ch in our (huge) company project, but there were some
errors during linking due to conflicts of ambiguous definitions of
some "basic" functions (see below) in your library (embedch.lib) and
ours. Before, we've tried another interpreter called EiC, those
problems were solved when compiling its source library code as
multithreaded (same as our project). Is this the problem and how can
we solve it? Below is the output of MSVC6:
msvcrt.lib(MSVCRT.dll) : error LNK2005: _exit already defined in
libcmtd.lib(crt0dat.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in
libcmtd.lib(dbgheap.obj)
msvcrt.lib(MSVCRT.dll) : error LNK2005: _free already defined in
libcmtd.lib(dbgheap.obj)
etc.
Yes. Sockets in Windows and Unix are different. You can use
#if _WIN32_
......
#else
......
#endif
in your program to deal with this problem. The sample socket
programs in Unix are available at
CHHOME/demos/lib/libc/sys/socket/client.ch
CHHOME/demos/lib/libc/sys/socket/server.ch
Bo
--- In ch_language@yahoogroups.com, zhaoqing wang <thezqwang@y...>
wrote:
> bo,
>
> Thanks. It works.
> But I don't understand why should I have to initialize the socket?
Does it mean the Windows just only supports the WinSock? If so, my
program couldn't be ported directly to unix or other machine except
using the conditional compilation. Right?
>
> bchen_666 <bochen@u...> wrote:
> Hi Zhaoqing,
>
> For TCP/IP communication using WinSock in Windows,
> a socket needs to be initialized first by calling WSAStartup().
> Please take a look at WinSock server/client sample programs in
> c:/Ch/demos/lib/libc/winsock/client.ch and server.ch.
>
> Bo
> --- In ch_language@yahoogroups.com, zhaoqing wang <thezqwang@y...>
> wrote:
> > Hi there,
> >
> > I have a piece of program about TCP/IP communication. I couldn't
> create the socket. Any hint is helpfule to me.
> > the attched file is the piece of program to create a socket.
> >
> > thanks,
> >
> > Zhaoqing Wang
> >
> > Zhejiang SCI-TECH University,
> > Hangzhou, Zhejiang, China
> >
> >
> >
> > ---------------------------------
> > Discover Yahoo!
> > Stay in touch with email, IM, photo sharing & more. Check it
out!
> > #include <stdio.h> /* for printf() and fprintf() */
> > #include <sys/socket.h> /* for socket(), bind(), and connect() */
> > #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */
> > #include <stdlib.h> /* for atoi() and exit() */
> > #include <string.h> /* for memset() */
> > #include <unistd.h> /* for close() */
> >
> >
> > int main(int argc, char *argv[])
> > {
> > int servSock; /* Socket descriptor for
> server */
> > int echoServPort;
> >
> > if (argc != 2) /* Test for correct number of arguments */
> > {
> > fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]);
> > exit(1);
> > }
> >
> > echoServPort = atoi(argv[1]); /* First arg: local port */
> >
> > /* Create socket for incoming connections */
> > if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) <
0)
> > printf("socket() failed\n");
> > }
>
>
>
>
> Ch - One Language for All (tm)
>
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/ch_language/
>
> To unsubscribe from this group, send an email to:
> ch_language-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> ---------------------------------
> Yahoo! Mail Mobile
> Take Yahoo! Mail with you! Check email on your mobile phone.
But I don't understand why should I have to initialize the socket? Does it mean the Windows just only supports the WinSock? If so, my program couldn't be ported directly to unix or other machine except using the conditional compilation. Right?
bchen_666 <bochen@...> wrote:
Hi Zhaoqing,
For TCP/IP communication using WinSock in Windows, a socket needs to be initialized first by calling WSAStartup(). Please take a look at WinSock server/client sample programs in c:/Ch/demos/lib/libc/winsock/client.ch and server.ch.
Bo --- In ch_language@yahoogroups.com, zhaoqing wang <thezqwang@y...> wrote: > Hi there, > > I have a piece of program about TCP/IP communication. I couldn't create the socket. Any hint is helpfule to me. > the attched file is the piece of program to create a socket. > > thanks, > > Zhaoqing Wang > > Zhejiang SCI-TECH University, > Hangzhou, Zhejiang, China > > > > --------------------------------- > Discover
Yahoo! > Stay in touch with email, IM, photo sharing & more. Check it out! > #include <stdio.h> /* for printf() and fprintf() */ > #include <sys/socket.h> /* for socket(), bind(), and connect() */ > #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */ > #include <stdlib.h> /* for atoi() and exit() */ > #include <string.h> /* for memset() */ > #include <unistd.h> /* for close() */ > > > int main(int argc, char *argv[]) > { > int servSock; /* Socket descriptor for server */ > int echoServPort; > > if (argc != 2) /* Test for
correct number of arguments */ > { > fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]); > exit(1); > } > > echoServPort = atoi(argv[1]); /* First arg: local port */ > > /* Create socket for incoming connections */ > if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) > printf("socket() failed\n"); > }
Hello everyone
I'm currently on a four day bicycle tour through
South Dakota and Minnesota and will be a bit out
of touch until I return.
As the founder and moderator of this group, I must
say, I am very pleased with how this group is working
so far. I know I am learning more about ch than
I knew previously. Good questions everyone.
I'll be back in regular communication in a few days.
TMacD
Hi Zhaoqing,
For TCP/IP communication using WinSock in Windows,
a socket needs to be initialized first by calling WSAStartup().
Please take a look at WinSock server/client sample programs in
c:/Ch/demos/lib/libc/winsock/client.ch and server.ch.
Bo
--- In ch_language@yahoogroups.com, zhaoqing wang <thezqwang@y...>
wrote:
> Hi there,
>
> I have a piece of program about TCP/IP communication. I couldn't
create the socket. Any hint is helpfule to me.
> the attched file is the piece of program to create a socket.
>
> thanks,
>
> Zhaoqing Wang
>
> Zhejiang SCI-TECH University,
> Hangzhou, Zhejiang, China
>
>
>
> ---------------------------------
> Discover Yahoo!
> Stay in touch with email, IM, photo sharing & more. Check it out!
> #include <stdio.h> /* for printf() and fprintf() */
> #include <sys/socket.h> /* for socket(), bind(), and connect() */
> #include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */
> #include <stdlib.h> /* for atoi() and exit() */
> #include <string.h> /* for memset() */
> #include <unistd.h> /* for close() */
>
>
> int main(int argc, char *argv[])
> {
> int servSock; /* Socket descriptor for
server */
> int echoServPort;
>
> if (argc != 2) /* Test for correct number of arguments */
> {
> fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]);
> exit(1);
> }
>
> echoServPort = atoi(argv[1]); /* First arg: local port */
>
> /* Create socket for incoming connections */
> if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
> printf("socket() failed\n");
> }
I have a piece of program about TCP/IP communication. I couldn't create the socket. Any hint is helpfule to me.
the attched file is the piece of program to create a socket.
thanks,
Zhaoqing Wang
Zhejiang SCI-TECH University,
Hangzhou, Zhejiang, China
Discover Yahoo! Stay in touch with email, IM, photo sharing more. Check it out!
#include <stdio.h> /* for printf() and fprintf() */
#include <sys/socket.h> /* for socket(), bind(), and connect() */
#include <arpa/inet.h> /* for sockaddr_in and inet_ntoa() */
#include <stdlib.h> /* for atoi() and exit() */
#include <string.h> /* for memset() */
#include <unistd.h> /* for close() */
int main(int argc, char *argv[])
{
int servSock; /* Socket descriptor for server */
int echoServPort;
if (argc != 2) /* Test for correct number of arguments */
{
fprintf(stderr, "Usage: %s <Server Port>\n", argv[0]);
exit(1);
}
echoServPort = atoi(argv[1]); /* First arg: local port */
/* Create socket for incoming connections */
if ((servSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
printf("socket() failed\n");
}
--- fish_hercules <fish@...> wrote:
> I've only JUST stumbled upon ch and am quite excited about its
> possibilities. The only thing I was unable to determine about it
> however was whether or not it supported multiple threads.
>
> Note: I haven't even installed ch yet; I've only browsed
> SoftIntegration's web site and downloaded their Standard Edition
> version. I should point out however that I *am* quite familiar with
> Windows multi-threaded programming (CreateThread,
> InitializeCriticalSection, CreateEvent, WaitForSingleObject,
> SetEvent,
> etc). The only thing I'm not clear on is how one calls into the Win32
> API from ch.
>
> Does anyone have and sample / example code that demonstrates how to
> use
> multiple threads in ch?
After you installed Embedded Ch evaluation, you may find embedded
ch multi-threads examples:
thread.c threads.c threadswin.c
at CHHOME/toolkit/demos/embedch/ref
Any suggestions are welcome.
Regards,
Tech support
>
> Or should I just RTFM? :)
>
> Thanks.
>
>
>
> (p.s. sorry about the crappy formatting; blame it on Yahoo's crappy
> web-based interface)
>
>
I've only JUST stumbled upon ch and am quite excited about its
possibilities. The only thing I was unable to determine about it
however was whether or not it supported multiple threads.
Note: I haven't even installed ch yet; I've only browsed
SoftIntegration's web site and downloaded their Standard Edition
version. I should point out however that I *am* quite familiar with
Windows multi-threaded programming (CreateThread,
InitializeCriticalSection, CreateEvent, WaitForSingleObject,
SetEvent,
etc). The only thing I'm not clear on is how one calls into the Win32
API from ch.
Does anyone have and sample / example code that demonstrates how to
use
multiple threads in ch?
Or should I just RTFM? :)
Thanks.
(p.s. sorry about the crappy formatting; blame it on Yahoo's crappy
web-based interface)
Hi Stephen,
Thanks for helping me. I already configured ConText to work with ch.
Foltos
Stephen wrote:
>Dear Foltos,
>
> A guide to set up ConTEXT for the execution of C/Ch/C++ scripts
>under the ConTEXT Editor using Ch is available at
>http://forum.context.cx/index.php?topic=174.0 .
>
>Stephen
>
>
Dear Foltos,
A guide to set up ConTEXT for the execution of C/Ch/C++ scripts
under the ConTEXT Editor using Ch is available at
http://forum.context.cx/index.php?topic=174.0 .
Stephen
--- In ch_language@yahoogroups.com, Foltos <foltos@g...> wrote:
> Hi!
>
> Thanks for the help. Somehow I looked over those pages in the
> documentation before :).
> I am using ConTEXT editor as an ide. Any way it would be good if
you
> could provide the mentioned debug API. Maybe I could add support
for ch
> to the "Data Display Debugger" (see: http://www.
gnu.org/software/ddd/).
>
> BR:
> Foltos
>
> groupsupport@s... wrote:
>
> >--- Foltos <foltos@g...> wrote:
> >
> >
> >
> >Ch itself has limited debugging capability.
> >You may find _stop() and debug in C:/Ch/docs/chguide.pdf.
> >
> >As far as Embedded Ch is concerned, the debug capability has been
planned
> >in our next release. Do you have your own IDE for editing and
> >running the scripts? we will provide the debug APIs for you to
hook up.
> >Any suggestions are welcome.
> >
> >Best regards,
> >
> >Tech support
> >
> >
> >
> Hi!
>
> Thanks for the help. Somehow I looked over those pages in the
> documentation before :).
> I am using ConTEXT editor as an ide. Any way it would be good if you
> could provide the mentioned debug API. Maybe I could add support for
> ch
> to the "Data Display Debugger" (see:
> http://www.gnu.org/software/ddd/).
That is great if you can help get it done.
We will keep you posted of our progress on working out the debug APIs.
Thanks so much.
Tech support
>
> BR:
> Foltos
Hi!
Thanks for the help. Somehow I looked over those pages in the
documentation before :).
I am using ConTEXT editor as an ide. Any way it would be good if you
could provide the mentioned debug API. Maybe I could add support for ch
to the "Data Display Debugger" (see: http://www.gnu.org/software/ddd/).
BR:
Foltos
groupsupport@... wrote:
>--- Foltos <foltos@...> wrote:
>
>
>
>Ch itself has limited debugging capability.
>You may find _stop() and debug in C:/Ch/docs/chguide.pdf.
>
>As far as Embedded Ch is concerned, the debug capability has been planned
>in our next release. Do you have your own IDE for editing and
>running the scripts? we will provide the debug APIs for you to hook up.
>Any suggestions are welcome.
>
>Best regards,
>
>Tech support
>
>
>
--- Foltos <foltos@...> wrote:
> Hi All!
>
> My name is Foltos (this is actually a nick name) and I just joined
> this
> mailing list. I started using ch a few days ago.
> I plan to use it as
> a
> test environment for embedded C applications.
>
> My first question as aboug debugging. Does ch support any debuggers?
Ch itself has limited debugging capability.
You may find _stop() and debug in C:/Ch/docs/chguide.pdf.
As far as Embedded Ch is concerned, the debug capability has been planned
in our next release. Do you have your own IDE for editing and
running the scripts? we will provide the debug APIs for you to hook up.
Any suggestions are welcome.
Best regards,
Tech support
> If
> yes from where can I get such a debugger? I am sure this question was
>
> already answered a lot of times, but I could not find any mail about
> this in the message history.
>
> Thanks in advance!
>
> BR:
> Foltos
Hi All!
My name is Foltos (this is actually a nick name) and I just joined this
mailing list. I started using ch a few days ago. I plan to use it as a
test environment for embedded C applications.
My first question as aboug debugging. Does ch support any debuggers? If
yes from where can I get such a debugger? I am sure this question was
already answered a lot of times, but I could not find any mail about
this in the message history.
Thanks in advance!
BR:
Foltos
I just wanted to send out a quick note welcoming all
the new members to this group. Please send ideas on
how to improve this group and what information best
serves the ch community.
TMacD
>
> Just bought the C++ graphical library (SIGL) two days ago. In the meanwhile I
> have been working with the evaluation version of SIGL for more than a month
> now.
>
> Does this make the difference you think? As soon as I change from the
> evaluation version to a licensed version, this feature will disappear?
>
>
>
> My code is a bit more complex since you would need the X-Plane plugin SDK for
> compiling it. Let me try next week when I have received the CD with SIGL from
> Soft Integration. Hopefully, after having installed a definite version of
> SIGL this pop up will disappear. You never know..
softintegration has a patch for this issue. You can send
the email to services@... with your order number/ID.
You should be able to get the patch for it for free.
Best regards,
Tech support
Just bought the C++ graphical library (SIGL) two days ago. In the meanwhile I have been working with the evaluation version of SIGL for more than a month now.
Does this make the difference you think? As soon as I change from the evaluation version to a licensed version, this feature will disappear?
My code is a bit more complex since you would need the X-Plane plugin SDK for compiling it. Let me try next week when I have received the CD with SIGL from Soft Integration. Hopefully, after having installed a definite version of SIGL this pop up will disappear. You never know..
----- Original Message -----
Do you use Ch Professional edition or softintegration C++ graphical library (SIGL)?
can you post your sample code?
Wayne
----- Original Message -----
Matt,
Thank you for your answer. I already specify "PLOT_OUTPUTTYPE_FILE", a type (.png in my case) and a name in the outputType. This all works fine and the plots I want to make are indeed created in my working path/directory. The problem is much smaller.
The thing is that when I call the plotting function in my interface (the one in which chplot is integrated in) the DOS type window of gnuplot.exe pops up on my screen for a split of a second. If I make ten plots, this happens ten times etc. The plots themselves do not pop up on my screen since I say in the code they have to be saved as .png pictures in my working directory and this works as desired.
Just the pop up on my screen of the DOS window of gnuplot.exe is ‘ugly’. That is it. I do not want this echo of calling gnuplot.exe popping up on my screen and with a small trick I want to suppress it.The question is how I do this…
It is a relatively minor problem.
Harrald
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
--- Harrald Luijerink <luijerinkhr@...> wrote:
>
> Matt,
>
>
>
> Thank you for your answer. I already specify "PLOT_OUTPUTTYPE_FILE", a type
> (.png in my case) and a name in the outputType. This all works fine and the
> plots I want to make are indeed created in my working path/directory. The
> problem is much smaller.
>
>
>
> The thing is that when I call the plotting function in my interface (the one
> in which chplot is integrated in) the DOS type window of gnuplot.exe pops up
> on my screen for a split of a second. If I make ten plots, this happens ten
> times etc. The plots themselves do not pop up on my screen since I say in the
> code they have to be saved as .png pictures in my working directory and this
> works as desired.
>
> Just the pop up on my screen of the DOS window of gnuplot.exe is ‘ugly’. That
> is it. I do not want this echo of calling gnuplot.exe popping up on my screen
> and with a small trick I want to suppress it. The question is how I do this…
>
>
>
> It is a relatively minor problem.
Do you use Ch Professional edition or softintegration
C++ graphical library (SIGL)?
can you post your sample code?
Wayne
Thank you for your answer. I already specify "PLOT_OUTPUTTYPE_FILE", a type (.png in my case) and a name in the outputType. This all works fine and the plots I want to make are indeed created in my working path/directory. The problem is much smaller.
The thing is that when I call the plotting function in my interface (the one in which chplot is integrated in) the DOS type window of gnuplot.exe pops up on my screen for a split of a second. If I make ten plots, this happens ten times etc. The plots themselves do not pop up on my screen since I say in the code they have to be saved as .png pictures in my working directory and this works as desired.
Just the pop up on my screen of the DOS window of gnuplot.exe is ‘ugly’. That is it. I do not want this echo of calling gnuplot.exe popping up on my screen and with a small trick I want to suppress it. The question is how I do this…
It is a relatively minor problem.
Harrald
----- Original Message -----
Harrald,
Depending on what your intended output is it sounds like that's what's supposed to
happen with gnuplot.When you call the "CPlot::plotting()" function, unless you've
specified a different output type, gnuplot is called and the plot is displayed.
The simplest fix to this is to call "CPlot::outputType()" and specify
"PLOT_OUTPUTTYPE_FILE" as the first arguement.The second arguement being the file
type and the third being the file name.See the "Chguide.pdf" in the "ch_home_dir/docs/"
directory for info on file types.This way the output of "::plotting()" is a file and you can
view it anytime you want and the call to gnuplot.exe is suppressed.
The other option is to output to a stream, but depending on what you're doing that could
be more complicated.Hope this helps.
Matt
----- Original Message -----
Hi all,
Just joined this Yahoo Group hoping that maybe some of you can help me
on the 'problem' I have.
I have integrated chplot in my C++ project for making plots of time-
responses of simulations.
The problem is that every time I plot, the window of the executable
gnuplot.exe pops up on my screen. It is not a huge problem, but I would
like to find a 'trick' to avoid this echo of calling gnuplot.exe
Harrald,
Depending on what your intended output is it sounds like that's what's supposed
to
happen with gnuplot. When you call the "CPlot::plotting()" function, unless
you've
specified a different output type, gnuplot is called and the plot is displayed.
The simplest fix to this is to call "CPlot::outputType()" and specify
"PLOT_OUTPUTTYPE_FILE" as the first arguement. The second arguement being the
file
type and the third being the file name. See the "Chguide.pdf" in the
"ch_home_dir/docs/"
directory for info on file types. This way the output of "::plotting()" is a
file and you can
view it anytime you want and the call to gnuplot.exe is suppressed.
The other option is to output to a stream, but depending on what you're doing
that could
be more complicated. Hope this helps.
Matt
--- In ch_language@yahoogroups.com, "Harrald Luijerink"
<luijerinkhr@y...> wrote:
> Hi all,
>
> Just joined this Yahoo Group hoping that maybe some of you can help
me
> on the 'problem' I have.
> I have integrated chplot in my C++ project for making plots of time-
> responses of simulations.
> The problem is that every time I plot, the window of the executable
> gnuplot.exe pops up on my screen. It is not a huge problem, but I
would
> like to find a 'trick' to avoid this echo of calling gnuplot.exe
>
> Does anybody have an idea?
>
> Regards,
>
> Harrald Luijerink
Hi all,
Just joined this Yahoo Group hoping that maybe some of you can help me
on the 'problem' I have.
I have integrated chplot in my C++ project for making plots of time-
responses of simulations.
The problem is that every time I plot, the window of the executable
gnuplot.exe pops up on my screen. It is not a huge problem, but I would
like to find a 'trick' to avoid this echo of calling gnuplot.exe
Does anybody have an idea?
Regards,
Harrald Luijerink
Chandidas,
There are many Ch compatible IDEs linked at
http://www.softintegration.com/products/thirdparty/. Many are freely
available including Crimson Editor. An example of using Crimson Editor
for editting and running C/Ch/C++ programs in Ch is available at
http://iel.ucdavis.edu/projects/mechanism/quickreturn/example.html.
Stephen
--- In ch_language@yahoogroups.com, "TMacD" <tmacd70783@y...> wrote:
> I have received email from Chandidas Deshpande:
>
> email: chumbhode at yahoo dot co dot in
>
> He teaches in India. I have encouraged him to join
> this group. A copy of our email exchange is below:
>
> Chandidas
>
> I recommend you join the ch yahoo group
>
> http://groups.yahoo.com/group/ch_language/
>
> where you will have other experts that can help answer your
> question. Another advantage of joining the group is
> that other people will be able to receive this adivce.
>
> Ch for windows comes wit the 'vim' editor that is very
> convenient for creating ch programs.
>
> You can also use notepad but the file must be a plain text
> file and not a rich text file.
>
> TMacD
>
> --- Chandidas Deshpande <chumbhode@y...> wrote:
>
> > Dear sir,
> > Thanks a lot for replying my querry. In my earlier mail I
> > had requested you to inform me about the editor that has to
> > used for preparing a file for graphics or any other
> > application . May I know whether I can use Microsoft word or
> > note pad for preparing a source file. Similarly whether IDE
> > for preparation of source file is available ? I teach
> > subjects like 'Control Systems ' , 'Signals and Systems' etc.
> > So I have to use graphics facility for teaching these
> > subjects. I hope my intention of using ch software would have
> > become clear to you.
> > Sincerely,
> > Chandidas
> >
> > Tom MacDonald <tmacd70783@y...> wrote:
> > It's true that you cannot use the #include preprocessing
> > directive in command mode. Command mode is intended
> > for shell style commands.
> >
> > Can you explain a little better what your goal is?
> >
> > If you are trying to create a graphical application, then
> > can you create a ch program in a file and use the ch
> > interpreter?
> >
> > TMacD
> >
> > --- chumbhode wrote:
> > > Dear Sir,
> > > I am a Professor in an Engineering College in India and I
> > > have down
> > > loaded the ch 5.0 professional package for using in
> > graphical
> > > applications. When I start writing a program in c language
> > in
> > > command
> > > mode of the package I get error on the first line it self
> > i.e.
> > > when we
> > > write #include . Similarly for drawing a graph we
> > > have to
> > > include appropriate file. So if I am getting error at the
> > > start itself
> > > I donot understand how to resolve this problem. I am using
> > > windows xp
> > > home edition as my operating system. Have I to use some
> > editor
> > > for
> > > this program and only to write the name of the file at the
> > > command
> > > prompt ? I will be obliged if this difficulty is solved.
> > > Thanking you and with regards,
> > > Sincerely,
> > > Chandidas
I have received email from Chandidas Deshpande:
email: chumbhode at yahoo dot co dot in
He teaches in India. I have encouraged him to join
this group. A copy of our email exchange is below:
Chandidas
I recommend you join the ch yahoo group
http://groups.yahoo.com/group/ch_language/
where you will have other experts that can help answer your
question. Another advantage of joining the group is
that other people will be able to receive this adivce.
Ch for windows comes wit the 'vim' editor that is very
convenient for creating ch programs.
You can also use notepad but the file must be a plain text
file and not a rich text file.
TMacD
--- Chandidas Deshpande <chumbhode@...> wrote:
> Dear sir,
> Thanks a lot for replying my querry. In my earlier mail I
> had requested you to inform me about the editor that has to
> used for preparing a file for graphics or any other
> application . May I know whether I can use Microsoft word or
> note pad for preparing a source file. Similarly whether IDE
> for preparation of source file is available ? I teach
> subjects like 'Control Systems ' , 'Signals and Systems' etc.
> So I have to use graphics facility for teaching these
> subjects. I hope my intention of using ch software would have
> become clear to you.
> Sincerely,
> Chandidas
>
> Tom MacDonald <tmacd70783@...> wrote:
> It's true that you cannot use the #include preprocessing
> directive in command mode. Command mode is intended
> for shell style commands.
>
> Can you explain a little better what your goal is?
>
> If you are trying to create a graphical application, then
> can you create a ch program in a file and use the ch
> interpreter?
>
> TMacD
>
> --- chumbhode wrote:
> > Dear Sir,
> > I am a Professor in an Engineering College in India and I
> > have down
> > loaded the ch 5.0 professional package for using in
> graphical
> > applications. When I start writing a program in c language
> in
> > command
> > mode of the package I get error on the first line it self
> i.e.
> > when we
> > write #include . Similarly for drawing a graph we
> > have to
> > include appropriate file. So if I am getting error at the
> > start itself
> > I donot understand how to resolve this problem. I am using
> > windows xp
> > home edition as my operating system. Have I to use some
> editor
> > for
> > this program and only to write the name of the file at the
> > command
> > prompt ? I will be obliged if this difficulty is solved.
> > Thanking you and with regards,
> > Sincerely,
> > Chandidas
I am the group moderator for this Ch language group.
Here is place where you can learn about the latest
Ch activities and ask questions about how to use,
install, or get Ch.
Ch is available from SoftIntegration (see Links)
and the Ch Standard Edition is available for free.
One of the key advantages to Ch is that it is
interpreted (avoiding lenghty compile and link
phases) but it can be compiled if needed. Thus
Ch allows for rapid program development and fast
prototyping.
Ch can also be used as a unix shell just like popular
shells such as bash, ksh and csh.
Check out the Links for pointers to documentation.
Happy programming everyone.