⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 as

📁 Algorithms for Image Processing and Computer Vision Source Code
💻
字号:
@c ----------------------------------------------------------------------
@node asctime, time
@heading @code{asctime}
@subheading Syntax

@example
#include <time.h>

char *asctime(const struct tm *tptr);
@end example

@subheading Description

This function returns an ASCII representation of the time represented by
@var{tptr}.  The string returned is always 26 characters and has this
format:

@example
Sun Jan 01 12:34:56 1993\n\0
@end example

The string pointed to is in a static buffer and will be overridden with
each call to asctime.  The data should be copied if it needs to be
preserved. 

@subheading Return Value

A pointer to the string.

@subheading Example

@example
time_t now;
time(&now);
printf("The current time is %s", asctime(localtime(&now)));
@end example

@c ----------------------------------------------------------------------
@node assert, misc
@heading @code{assert}
@subheading Syntax

@example
#define NDEBUG
#include <assert.h>

assert(expression);
assertval(expression);
@end example

@subheading Description

These macros are used to assist in debugging.  The source code includes
references to assert and assertval, passing them expressions that should
be true (or non-zero).  When the expression equals zero, a diagnostic
message is printed to stderr and the program aborts.

If you define the macro @code{NDEBUG} before including @file{assert.h},
then the macros expand to nothing to reduce code size after debugging is
done.

@subheading Return Value

@code{assert} returns one if it passes, else it aborts.

@code{assertval} returns the value of the expression if nonzero, else it
aborts.

@subheading Example

@example
int strdup(char *s)
@{
  assert(s != 0);
@end example

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -