[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Command line switches

Posted on 2001-06-19
4
Medium Priority
?
152 Views
Last Modified: 2010-04-06
I need help creating a program that will accept command line switches. I do not have a clue where to begin

Any one got any pointers?


Steve
0
Comment
Question by:stephenarnott
[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
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
geobul earned 150 total points
ID: 6205539
Hi,

See ParamCount and ParamStr functions.

Regards, Geo
0
 
LVL 8

Expert Comment

by:TOndrej
ID: 6205544
Also see FindCmdLineSwitch in SysUtils
0
 
LVL 17

Expert Comment

by:geobul
ID: 6205547
From Delphi help:

procedure TForm1.FormCreate(Sender: TObject);

var
  i: Integer;
  for i := 0 to ParamCount ? 1 do
  begin
    if LowerCase(ParamStr(i)) = 'beep' then
      Beep(10000,1000)
    else if (LowerCase(ParamStr(i)) = 'exit' then
      Application.Terminate;
  end;
end;

Regards, Geo
0
 

Author Comment

by:stephenarnott
ID: 6205689
Fast Answers always the best
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

650 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