Solved

Console Application (for CGI)

Posted on 1998-09-24
8
245 Views
Last Modified: 2013-11-18
Hi...

I want to develop a console application with Delphi, to use it as a CGI application. So I need to read/write from/to the standard in/output. How can I do this...?

Thanx
  Sven
0
Comment
Question by:sven99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1340763
try
{$APPTYPE CONSOLE}
in your project source

regs,
Black Death
0
 
LVL 1

Expert Comment

by:BlackDeath
ID: 1340764
example:

program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

{$R *.RES}

var
  i: integer;
 
begin
  Write('enter value:');
  Readln(i);
  Writeln('you entered: ' + inttostr(i));
  Write('press ENTER to end the program');
  Readln;
end.
0
 

Author Comment

by:sven99
ID: 1340765
Thank you very much... do you mark the question to answered, that I can give you the Points...

Bye
  Sven
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:viktornet
ID: 1340766
Hello you two!

I know this that's the way to do a console app, and I've tried many other ways, and some kinda components, but never got it working. here is similar to what I get....When I try to run the app I get "This program can not run without Microsoft Windows", or something similar. I can't exactly see what it says because it closes it immediately and the app runs in the background. When I open the task menager by pressing Ctrl+Alt+Del and close the app so it stops running, my computer hangs up and the on;ly way to get out of that is ti press the Reset button. Any ideas on why it is doing that? or maybe what settings I need to set so it can run on my computer too...

regards,
Viktor Ivanov
0
 

Author Comment

by:sven99
ID: 1340767
Hmmm, I have tried it, ad it works... You can give me your EMail adress, and I will sent you my Testproject, including the EXE-File.

I use Borland Delphi 3.0 and Windows NT.

Bye
  Sven
0
 
LVL 1

Accepted Solution

by:
BlackDeath earned 50 total points
ID: 1340768
you're welcome
0
 

Author Comment

by:sven99
ID: 1340769
Thanx.


0
 

Author Comment

by:sven99
ID: 1340770
"victornet", you can reach me under sschaefer@interflex.de
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question