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. mock测试到底是什么?

    ​    ​经常听人说mock测试,究竟什么是mock测试呢?mock测试能解决什么问题?mock测试要如何做呢?今天为大家做简单介绍,之后会有详细的mock测试,感谢大家对测试梦工厂的持续关注. 概 ...

  2. ubuntu下sublime中文无法输入的问题

    感谢- http://www.cnblogs.com/ningvsban/p/4346766.html

  3. excel 导入数据库 / SSIS 中 excel data source --64位excel 版本不支持-- solution

    当本地安装的excel(2013版) 是64-bit时:出现的以下两种错误 解决: 1. excel 导入数据库 , 如果文件是2007则会出现:“The 'Microsoft.ACE.OLEDB.1 ...

  4. winform中生成TreeView树

    无论是webform还是winform,TreeView都是常用功能.使用递归方法很方便. 下面分享一个小实例. 数据库中3个字段,分别是:ID,itemType_name,itemType_PID ...

  5. mybatis实战教程(mybatis in action)之九:mybatis 代码生成工具的使用

    mybatis 应用程序,需要大量的配置文件,对于一个成百上千的数据库表来说,完全手工配置,这是一个很恐怖的工作量. 所以mybatis 官方也推出了一个mybatis代码生成工具的jar包. 今天花 ...

  6. C# 随机红包算法

    static void Main(string[] args) { ; ; double minAmount = 0.01; Random r = new Random(); ; i < num ...

  7. SQL分页查询

    假如tb_customer表中的数据量非常大,在显示时要分页显示而且每页只显示10条信息.为了效果我们取第三页的数据. 方法一:遍历两次表,取不同的数据. select top 10 * from t ...

  8. sql sever笔记 日期时间

     SET DATEFORMAT 的设置是在执行或运行时设置,而不是在分析时设置. SET DATEFORMAT 将覆盖 SET LANGUAGE 的隐式日期格式设置. 该设置仅用在将字符串转换为日期值 ...

  9. 重载Python FTP_TLS 实现Implicit FTP Over TLS方式下载文件

    对于Python2.7来说,内置的FTP_TLS类并不支持Implicit FTP Over TLS加密方式的FTP Server操作,为支持Implicit FTP Over TLS加密方式,必须重 ...

  10. 建立一套完整的Maven依赖工程步骤,包含WEB工程

    建立Java Web工程:File -> New -> other… -> Web -> Dynamic Web Project,abs-inf选中该工程右键 -> co ...