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

📄 abs.c

📁 用于嵌入式Linux系统的标准C的库函数
💻 C
字号:
/*FUNCTION<<abs>>---integer absolute value (magnitude)INDEX	absANSI_SYNOPSIS	#include <stdlib.h>	int abs(int <[i]>);TRAD_SYNOPSIS	#include <stdlib.h>	int abs(<[i]>)	int <[i]>;DESCRIPTION<<abs>> returns@tex$|x|$,@end texthe absolute value of <[i]> (also called the magnitudeof <[i]>).  That is, if <[i]> is negative, the result is the oppositeof <[i]>, but if <[i]> is nonnegative the result is <[i]>.The similar function <<labs>> uses and returns <<long>> rather than <<int>> values.RETURNSThe result is a nonnegative integer.PORTABILITY<<abs>> is ANSI.No supporting OS subroutines are required.*/#include <stdlib.h>int_DEFUN (abs, (i), int i){  return (i < 0) ? -i : i;}

⌨️ 快捷键说明

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