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;

    下次再学。。。

  • 相关阅读:
    少儿编程之图形编程
    少儿编程是什么?要学吗?如何学?
    AlloyDesigner 使用
    轮播总结
    git实用攻略
    git subtree用法(转)
    vue 插值,v-once,v-text, v-html
    webpack的学习准备工作
    webstorm中github的配置
    less 安装和webstorm的使用
  • 原文地址:https://www.cnblogs.com/ZhouXiHong/p/634176.html
Copyright © 2011-2022 走看看