ZHCUAV8W january 1998 – march 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
高級別函數(shù)是流 I/O 例程(printf、scanf、fopen、getchar 等等)的標準 C 庫。這些函數(shù)會調(diào)用一個或多個低級別 I/O 函數(shù)來執(zhí)行高級別 I/O 請求。高級別 I/O 例程采用 FILE 指針(也被稱為流)運行。
便攜式應(yīng)用只應(yīng)使用高級別 I/O 函數(shù)。
若要使用高級別 I/O 函數(shù),請進行以下操作:
例如,在名為 main.c 的文件中提供以下 C 程序:
#include <stdio.h>
void main()
{
FILE *fid;
fid = fopen("myfile","w");
fprintf(fid,"Hello, world\n");
fclose(fid);
printf("Hello again, world\n");
}通過發(fā)出以下編譯器命令,從運行時支持庫編譯、鏈接和創(chuàng)建 main.out:
armcl main.c --run_linker --heap_size=400 --library=rtsv4_A_be_eabi.lib --output_file=main.out執(zhí)行 main.out 會得到
Hello, world輸出到文件以及
Hello again, world輸出到主機的 stdout 窗口。