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;

    下次再学。。。

  • 相关阅读:
    树上莫队 SPOJ COT2
    UVA 11478(差分约束 + 二分)
    可图的度序列判断与构造
    Codeforces Round #306 (Div. 2) 550A Two Substrings
    UVA 11300 分金币
    HDU 2546 饭卡(01 背包)
    hdu 1142 最短路+记忆化
    codeforces ice cave
    codeforces school mark(贪心)
    JavaScript函数
  • 原文地址:https://www.cnblogs.com/ZhouXiHong/p/634176.html
Copyright © 2011-2022 走看看