S3C44B0 uart程序库 c文件
/* =========================================================================== */
/* Project: s3c44b0_lib */
/* File: uart.c */
/* Organization: cug-1200525 */
/* Author: yuyongbao */
/* Date: 4/10/2007 */
/* Describe: lib */
/* =========================================================================== */
#include "lib_config.h"
#include "uart.h" /*Declaration of functions*/
#include <stdarg.h>
#include &l
相关文档:
http://c.chinaitlab.com/c/basic/200907/789321.html
词法陷阱:
1 = 不同于==不要在程序中将两者写错,小心。将表达式与常量比较时,可将常量放在左边。
2 &和| 不同于& ......
堆和栈的区别
一、预备知识—程序的内存分配
一个由c/C++编译的程序占用的内存分为以下几个部分
1、栈区(stack)— 由编译器自动分配释放 ,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。
2、堆区(heap)— 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回收 。 ......
最近一段时间在研究 Pro*C 遇到了很多初级问题。在 Pro*C 中连接数据库时,我们一般是使用在“tnsnames.ora”中配置好连接,写起来很简单,语法如下:
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :dbname;
/* 这里的 dbname 就是在 ......
The meaning of each is:
MemberMeaningRange
tm_sec
seconds after the minute
0-61*
tm_min
minutes after the hour
0-59
tm_hour
hours since midnight
0-23
tm_mday
day of the month
1-31
tm_mon
months since January
0-11
tm_year
years since 1900
tm_wday
days since Sunday
0-6
tm_yday
d ......
1、为了调用宏时能得到正确结果,在宏体中建议对宏的每个参数用括号括起来,并且当宏体是一个表达式时整个宏体也用括号括起来。
/* c1.c:将两个数相乘 */
#define product(x,y) ((x)*(y))
#include <stdio.h>
int main(){
int a=1,b=2,c=3,d=4,x=0;
x=product(a+3,b)+product(c,d); / ......