int main(int argc, char **argv) {

     std::string reportDir;
std::string transURL;
std::string visualElement;
std::string outputFile;
std::string outputType;
static std::string SASFontsLoc;
static std::string SASResLoc;
static std::string SASLocale;
int width=, height=; /* default */
int dpi=; /* Default DPI */
int kpiIndex=, rowIndex=, colIndex=, section=; /* Parse the arguments */
int idx=;
while (idx < argc)
{
if (strcmp(argv[idx], "-report") == )
reportDir = argv[++idx];
else if (strcmp(argv[idx], "-ve") == )
visualElement = argv[++idx];
else if (strcmp(argv[idx], "-section") == )
section = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-outfile") == )
outputFile = argv[++idx];
else if (strcmp(argv[idx], "-outtype") == )
outputType = argv[++idx];
else if (strcmp(argv[idx], "-fontsloc") == )
SASFontsLoc = argv[++idx];
else if (strcmp(argv[idx], "-resourceloc") == )
SASResLoc = argv[++idx];
else if (strcmp(argv[idx], "-locale") == )
SASLocale = argv[++idx];
else if (strcmp(argv[idx], "-dpi") == )
dpi = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-width") == )
width = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-height") == )
height = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-kpiindex") == )
kpiIndex = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-rowindex") == )
rowIndex = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-colindex") == )
colIndex = atoi(argv[++idx]);
else if (strcmp(argv[idx], "-tsurl") == )
transURL = argv[++idx];
idx++;
} return ;
}

Parse the main function arguments的更多相关文章

  1. Main function

    Main function A program shall contain a global function named main, which is the designated start of ...

  2. [Cycle.js] Customizing effects from the main function

    How can we show one string on the DOM, and a completely different string on Console log? This lesson ...

  3. [Cycle.js] Main function and effects functions

    We need to give structure to our application with logic and effects. This lessons shows how we can o ...

  4. com.android.dx.command.Main with arguments

    Error:Execution failed for task ':jingyeyun:transformClassesWithDexForDebug'.> com.android.build. ...

  5. JS Function Arguments

    Function arguments在ECMAScript中的行为并不像其他大多数语言中的函数参数. 在ECMAScript中,function 并不关心有多少个参数传入函数中,也不关心传入参数的数据 ...

  6. The App Life Cycle & The Main Function

    The App Life Cycle Apps are a sophisticated interplay between your custom code and the system framew ...

  7. [Javascript] Required function arguments in Javascript

    In Javascript, all function arguments are optional by default. That means if you ever forget to pass ...

  8. SetApartmentState(ApartmentState state).Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process

    System.Threading.ThreadStateException: 'Current thread must be set to single thread apartment (STA) ...

  9. how to tell a function arguments length in js

    how to tell a function arguments length in js JavaScript函数不对参数值(参数)执行任何检查 https://www.w3schools.com/ ...

随机推荐

  1. oracle数据库从入门到精通之四

    序列是oracle中较为重要的概念事务对于ddl是不起作用的查询,更新,数据表,约束这些个概念要掌握.在许多数据库之中都会存在一种数据类型--自动增长列,它能够创建流水号12c之前并没有提供这样一个自 ...

  2. IOS开发-图片上传

    目前IOS端开发,图片上传到服务器分为两种,一种是直接上到服务器,一种是借助第三方储存(减少服务器压力). 一.直接上传到服务器 /** * 代码演示 */ //*******UIImagePNGRe ...

  3. JS常用工具函数

    /** * Created by gaojun-pd on 2016/10/27. */ var Util = { /** * 1.判断非空 * 2.获取字符串真实长度 汉字算两位 * 3.判断参数类 ...

  4. sql server 去除(替换)空格,回车,换行 函数

    --create-- SQL去除回车符,换行符,空格和水平制表符create function RepSymbolChar(@str nvarchar(max))returns nvarchar(ma ...

  5. Lambda演算 - 简述Y组合子的作用

    Y组合子:\f.(\x.f(xx))(\x.f(xx)),接受一个函数,返回一个高阶函数 Y组合子用于生成匿名递归函数. 什么叫匿名递归函数,考虑以下C语言递归函数 int sum(int n) { ...

  6. bug__android studio 出现布局文件不提示,且点击代码不能跟踪代码

    1,点击布局文件,出现  Cannot find declaration to  go to ? 且 点击代码不能跟踪代码? 把 项目的build.gradle 中的  compileSdkVersi ...

  7. php 对url 操作类:url拼接、get获取页面、post获取页面(带传参)

    /* * @brief url封装类,将常用的url请求操作封装在一起 * */ class URL{ private $error; public function __construct(){ $ ...

  8. mysql解决Value ‘0000-00-00 00:00:00’ can not be represented as java.sql.Timestamp

    同步发布:http://www.yuanrengu.com/index.php/mysqlsolvetimestamp.html 在使用mysql时,如果数据库中的字段类型是timestamp,默认为 ...

  9. System.Drawing.Color

    System.Drawing.Color color=Color.Red; System.Drawing.Color color=Color.FromArgb(,,); System.Drawing. ...

  10. javascript、ECMAScript、DOM、BOM关系

    ECMAScript,正式名称为 ECMA 262 和 ISO/IEC 16262,是宿主环境中脚本语言的国际 Web 标准. ECMAScript 规范定义了一种脚本语言实现应该包含的内容:但是,因 ...