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. 如何解决CDR x8安装时显示“已停止工作”

    相信很多朋友在安装cdr X8时会遇到这样一种情况,能装上去,但不能运行,弹出提示说CorelDRAW X8(64-bit)已停止工作.同样的X8安装包,在不同的电脑上测试有的没有问题,有的则会出现以 ...

  2. windows开机记录查询

    http://jingyan.baidu.com/article/3d69c5516b9a9ef0cf02d7f3.html

  3. HttpClientUtil [使用apache httpclient模拟http请求]

    基于httpclient-4.5.2 模拟http请求 以get/post方式发送json请求,并获取服务器返回的json -------------------------------------- ...

  4. GDI+ 操作TIFF ccitt t.6 压缩

    Bitmap Bi=new Bitmap("C:\img.tif"); SaveFileDialog sfdlg = new SaveFileDialog(); sfdlg.Fil ...

  5. D3制作基础图表学习总结(part1)

    一.基本的环境搭建(和使用其他框架或js库一样) 1.建立一个工程: 2.在html文件中引入D3的文件: 附上git地址:https://github.com/d3/d3/wiki  二.建立图表 ...

  6. C#程序以管理员身份运行

    选中"Security",在界面中勾选"Enable ClickOnce Security Settings"后,在Properties下就有自动生成app.m ...

  7. Node.js的循环与异步问题

    (转自:http://bbs.tianya.cn/post-itinfo-280080-1.shtml) Node.js 的异步机制由事件和回调函数实现,一开始接触可能会感觉违反常规,但习惯 以后就会 ...

  8. 彻底弄懂响应式设计中的em和rem

    前一阵子在响应式开发中遇到了em和rem的问题,也上网搜过一些文章,篇幅很长,也没有仔细看,今天来总结一下. rem是指:根元素(root element,html)的字体大小, em是指:父元素的字 ...

  9. Click模块化路由器

    [概述] Click是一种基于软件控制的模块化路由器.其架构可以大致视为一系列数据包处理模块(称为elements)组成的.一个Click路由器可以看成一张由elements作为顶点,数据包传递路径作 ...

  10. Java 多张图片合成一张 drawImage

      package com.yunfengtech.solution.business; import java.awt.Color; import java.awt.Graphics; import ...