zoukankan      html  css  js  c++  java
  • ParamStr、ParamCount、CmdLine熊猫烧香代码学习之一

    http://community.csdn.net/Expert/TopicView3.asp?id=5320418

    Returns a specified parameter from the command-line.
    返回当前命令行的详细参数信息
    Unit

    System

    Category

    command line utilities

    Delphi syntax:

    function ParamStr(Index: Integer): string;

    C++ syntax:

    extern PACKAGE AnsiString __fastcall ParamStr(int Index);

    Description

    ParamStr returns the parameter from the command line that corresponds to Index, or an empty string if Index is greater than ParamCount. For example, an Index value of 2 returns the second command-line parameter.

    On Windows, ParamStr(0) returns the path and file name of the executing program (for example, C:\TEST\MYPROG.EXE).
    On Linux, ParamStr(0) returns the command used to execute the program, without parameters (for example, ./myprogram). This behavior is dependent on information returned by the shell program and may not be consistent among all shells.
    Note:    Use double quotes to wrap multiple words as one parameter (such as long file names containing spaces).

    ParamStr(0) 在windows下返回应用程序路径和文件名称(含扩展名),参数则从1开始,
    “function ParamCount: Integer; ”则返回存在的参数数量

    另:
    Delphi syntax:

    var CmdLine: PChar platform;

    下次再学。。。

  • 相关阅读:
    4. Dictionary HashTable
    5.1. ISet HashSet
    5.2.ISet SortedSet
    6.1. String
    6.2. Encoding
    2.1. List
    1. 基础类型
    0.源代码代码分布情况
    0.2.比较接口Default
    Android获取应用启动时间
  • 原文地址:https://www.cnblogs.com/ZhouXiHong/p/634176.html
Copyright © 2011-2022 走看看