FindCmdLineSwitch()
功能 :返回程序命令参数是否找到。
看不明白具体实现什么功能,谁能帮我解释一下?

解决方案 »

  1.   

    var s : string;
        sc: TSysCharSet;s:='help';
    sc:=['/','-','|'];// executed as: AppName.exe /helpif FindCmdLineSwitch(s,sc,False) then
       ShowMessage('Application called with
                    HELP parameter!');
      

  2.   

    function FindCmdLineSwitch(const Switch: string; Chars: TSysCharSet; IgnoreCase: Boolean): Boolean;FindCmdLineSwitch determines whether a string represents a command-line switch, based on the first character of the string.Switch is a command line parameter, typically provided by the ParamStr function.Chars is the set of characters that distinguish switches from other parameters. If SwitchChars is omitted, it defaults to '/' and '-' on Windows, and to '-' on Linux.IgnoreCase determines whether case-insensitive character matching is used. The default is true on Windows, false on Linux.个人认为有这些资料,理解这个函数功能已经足够了。
    如果你还不能理解,那我也无能为力了。
      

  3.   

    看字符串是否作为命令行参数传给应用程序
    function FindCmdLineSwitch(const Switch: string; Chars: TSysCharSet; IgnoreCase: Boolean): Boolean; overload;Switch是一个命令行参数,chars是字符集,ignorecase就不用说了吧,返回值是boolean的