关于FindCmdLineSwitch函数的使用

Ascn 2004-02-17 10:43:03
谁知道这个函数怎么用的?
Determines whether a string was passed as a command line argument to the application.

Unit

SysUtils

Category

command line utilities

function FindCmdLineSwitch(const Switch: string; SwitchChars: TSysCharSet; IgnoreCase: Boolean): Boolean;

Description

FindCmdLineSwitch determines whether the string specified by the Switch parameter was passed as a command line argument to the application. SwitchChars identifies valid argument-delimiter characters (such as "-"and "/"). The IgnoreCase parameter controls whether a case-sensitive or case-insensitive search is performed.

由于没有找到例子代码,我不知道它具体怎么用,因为我想让自己的程序可传入多个
参数,各参数不分顺序,如下格式:
myApp.exe -U:user -P:pwd
或者: myApp.exe -U user -P pwd

麻烦给点具体代码,必须要带switch处理的。谢谢
...全文
182 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复

5,928

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧