array(2) { ["docs"]=> array(10) { [0]=> array(10) { ["id"]=> string(3) "428" ["text"]=> string(77) "Visual Studio 2017 单独启动MSDN帮助(Microsoft Help Viewer)的方法" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(8) "DonetRen" ["tagsname"]=> string(55) "Visual Studio 2017|MSDN帮助|C#程序|.NET|Help Viewer" ["tagsid"]=> string(23) "[401,402,403,"300",404]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400964" ["_id"]=> string(3) "428" } [1]=> array(10) { ["id"]=> string(3) "427" ["text"]=> string(42) "npm -v;报错 cannot find module "wrapp"" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(4) "zzty" ["tagsname"]=> string(50) "node.js|npm|cannot find module "wrapp“|node" ["tagsid"]=> string(19) "[398,"239",399,400]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400760" ["_id"]=> string(3) "427" } [2]=> array(10) { ["id"]=> string(3) "426" ["text"]=> string(54) "说说css中pt、px、em、rem都扮演了什么角色" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(12) "zhengqiaoyin" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511400640" ["_id"]=> string(3) "426" } [3]=> array(10) { ["id"]=> string(3) "425" ["text"]=> string(83) "深入学习JS执行--创建执行上下文(变量对象,作用域链,this)" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "Ry-yuan" ["tagsname"]=> string(33) "Javascript|Javascript执行过程" ["tagsid"]=> string(13) "["169","191"]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511399901" ["_id"]=> string(3) "425" } [4]=> array(10) { ["id"]=> string(3) "424" ["text"]=> string(30) "C# 排序技术研究与对比" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(9) "vveiliang" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(8) ".Net Dev" ["catesid"]=> string(5) "[199]" ["createtime"]=> string(10) "1511399150" ["_id"]=> string(3) "424" } [5]=> array(10) { ["id"]=> string(3) "423" ["text"]=> string(72) "【算法】小白的算法笔记:快速排序算法的编码和优化" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(9) "penghuwan" ["tagsname"]=> string(6) "算法" ["tagsid"]=> string(7) "["344"]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511398109" ["_id"]=> string(3) "423" } [6]=> array(10) { ["id"]=> string(3) "422" ["text"]=> string(64) "JavaScript数据可视化编程学习(二)Flotr2,雷达图" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "chengxs" ["tagsname"]=> string(28) "数据可视化|前端学习" ["tagsid"]=> string(9) "[396,397]" ["catesname"]=> string(18) "前端基本知识" ["catesid"]=> string(5) "[198]" ["createtime"]=> string(10) "1511397800" ["_id"]=> string(3) "422" } [7]=> array(10) { ["id"]=> string(3) "421" ["text"]=> string(36) "C#表达式目录树(Expression)" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(4) "wwym" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(4) ".NET" ["catesid"]=> string(7) "["119"]" ["createtime"]=> string(10) "1511397474" ["_id"]=> string(3) "421" } [8]=> array(10) { ["id"]=> string(3) "420" ["text"]=> string(47) "数据结构 队列_队列实例:事件处理" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(7) "idreamo" ["tagsname"]=> string(40) "C语言|数据结构|队列|事件处理" ["tagsid"]=> string(23) "["246","247","248",395]" ["catesname"]=> string(12) "数据结构" ["catesid"]=> string(7) "["133"]" ["createtime"]=> string(10) "1511397279" ["_id"]=> string(3) "420" } [9]=> array(10) { ["id"]=> string(3) "419" ["text"]=> string(47) "久等了,博客园官方Android客户端发布" ["intro"]=> string(288) "目录 ECharts 异步加载 ECharts 数据可视化在过去几年中取得了巨大进展。开发人员对可视化产品的期望不再是简单的图表创建工具,而是在交互、性能、数据处理等方面有更高的要求。 chart.setOption({ color: [ " ["username"]=> string(3) "cmt" ["tagsname"]=> string(0) "" ["tagsid"]=> string(2) "[]" ["catesname"]=> string(0) "" ["catesid"]=> string(2) "[]" ["createtime"]=> string(10) "1511396549" ["_id"]=> string(3) "419" } } ["count"]=> int(200) } 222 #if, #elif, #else, #endif学习 - 爱码网

These preprocessing directives create conditional compiling parameters that control thecompiling of the source code. They must begin on a separate line.

Syntax:

#if constant_expression
#else
#endif

 

or

#if constant_expression
#elif constant_expression
#endif

The compiler only compiles the code after the #if expression if the constant_expressionevaluates to a non-zero value (true). If the value is 0 (false), then the compiler skips the linesuntil the next #else, #elif, or #endif. If there is a matching #else, and the constant_expressionevaluated to 0 (false), then the lines between the #else and the #endif are compiled. If there is amatching #elif, and the preceding #if evaluated to false, then the constant_expression after thatis evaluated and the code between the #elif and the #endif is compiled only if this expressionevaluates to a non-zero value (true).

Examples:

int main(void)
{
#if 1
printf("Yabba Dabba Do!\n");
#else
printf("Zip-Bang!\n");
#endif
return 0;
}

Only "Yabba Dabba Do!" is printed.

int main(void)
{
#if 1
printf("Checkpoint1\n");
#elif 1
printf("Checkpoint2\n");
#endif
return 0;
}

Only "Checkpoint1" is printed. Note that if the first line is #if 0, then only "Checkpoint2" wouldbe printed.

#if OS==1
printf("Version 1.0");
#elif OS==2
printf("Version 2.0");
#else
printf("Version unknown");
#endif

Prints according to the setting of OS which is defined with a #define.

The preprocessing directives #define and #undef allow the definition of identifiers whichhold a certain value. These identifiers can simply be constants or a macro function. Thedirectives #ifdef and #ifndef allow conditional compiling of certain lines of code based onwhether or not an identifier has been defined.

Syntax:

#define identifier replacement-code

 

#undef identifier

#ifdef identifier
#else or #elif
#endif

#ifndef identifier
#else or #elif
#endif

#ifdef identifier is the same is #if defined( identifier).
#ifndef identifier is the same as #if!defined(identifier).
An identifier defined with #define is available anywhere in the source code until a#undef is reached.
A function macro can be defined with #define in the following manner:

#define identifier(parameter-list) (replacement-text)

The values in the parameter-list are replaced in the replacement-text.

 

Examples:

 
#define PI 3.141
printf("%f",PI);

 

#define DEBUG
#ifdef DEBUG
printf("This is a debug message.");
#endif

#define QUICK(x) printf("%s\n",x);
QUICK("Hi!")

#define ADD(x, y) x + y
z=3 * ADD(5,6)

 

This evaluates to 21 due to the fact that multiplication takes precedence over addition.

#define ADD(x,y) (x + y)
z=3 * ADD(5,6)

This evaluates to 33 due to the fact that the summation is encapsulated in parenthesis whichtakes precedence over multiplication.

1.7.3 #include

The #include directive allows external header files to be processed by the compiler.

Syntax:

#include <header-file>

 

or

#include "source-file"

When enclosing the file with < and >, then the implementation searches the knownheader directories for the file (which is implementation-defined) and processes it. Whenenclosed with double quotation marks, then the entire contents of the source-file is replaced atthis point. The searching manner for the file is implementation-specific.

Examples:

#include <stdio.h>
#include "my_header.h"

1.7.4 #line

The #line directive allows the current line number and the apparent name of the currentsourcecode filename to be changed.

Syntax:

#line line-number filename

Note that if the filename is not given, then it stays the same. The line number on thecurrent line is one greater than the number of new-line characters (so the first line number is 1).
Examples:

#line 50 user.c

 

#line 23

1.7.5 #error

The #error directive will cause the compiler to halt compiling and return with thespecified error message.

Syntax:

#error message

Examples:

#ifndef VERSION
#error Version number not specified.
#endif

1.7.6 #pragma

This #pragma directive allows a directive to be defined. Its effects areimplementation-defined. If the pragma is not supported, then it is ignored.

Syntax:

#pragma directive

1.7.7 Predefined Macros

The following macros are already defined by the compiler and cannot be changed.

__LINE__ A decimal constant representing the current line number.
__FILE__ A string representing the current name of the source code file.
__DATE__ A string representing the current date when compiling began for the currentsource file. It is in the format "mmm dd yyyy", the same as what is generated bythe asctime function.
__TIME__ A string literal representing the current time when cimpiling began for the currentsource file. It is in the format "hh:mm:ss", the same as what is generated by theasctime function.
__STDC__ The decimal constant 1. Used to indicate if this is a standard C compiler.

相关文章: