日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

a开头的计算机语言,我们刚开始接触计算机语言大多从Hello world 开始

發布時間:2025/3/15 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 a开头的计算机语言,我们刚开始接触计算机语言大多从Hello world 开始 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

該樓層疑似違規已被系統折疊?隱藏此樓查看此樓

char?szClassName[]?=?"MainWnd";

HINSTANCE?hInstance;

int?WINAPI?WinMain(HINSTANCE?hInst,?HINSTANCE?hPrevInstance,?LPSTR?lpCmdLine,?int?nCmdShow)

{

HWND?hwnd;

MSG?msg;

WNDCLASSEX?wincl;

hInstance?=?hInst;

wincl.cbSize?=?sizeof(WNDCLASSEX);

wincl.cbClsExtra?=?0;

wincl.cbWndExtra?=?0;

wincl.style?=?0;

wincl.hInstance?=?hInstance;

wincl.lpszClassName?=?szClassName;

wincl.lpszMenuName?=?NULL;?//No?menu

wincl.lpfnWndProc?=?WindowProcedure;

wincl.hbrBackground?=?(HBRUSH)(COLOR_WINDOW?+?1);?//Color?of?the?window

wincl.hIcon?=?LoadIcon(NULL,?IDI_APPLICATION);?//EXE?icon

wincl.hIconSm?=?LoadIcon(NULL,?IDI_APPLICATION);?//Small?program?icon

wincl.hCursor?=?LoadCursor(NULL,?IDC_ARROW);?//Cursor

if?(!RegisterClassEx(&wincl))

return?0;

hwnd?=?CreateWindowEx(0,?//No?extended?window?styles

szClassName,?//Class?name

"",?//Window?caption

WS_OVERLAPPEDWINDOW?&?~WS_MAXIMIZEBOX,

CW_USEDEFAULT,?CW_USEDEFAULT,?//Let?Windows?decide?the?left?and?top?positions?of?the?window

120,?50,?//Width?and?height?of?the?window,

NULL,?NULL,?hInstance,?NULL);

//Make?the?window?visible?on?the?screen

ShowWindow(hwnd,?nCmdShow);

//Run?the?message?loop

while?(GetMessage(&msg,?NULL,?0,?0))

{

TranslateMessage(&msg);

DispatchMessage(&msg);

}

return?msg.wParam;

}

LRESULT?CALLBACK?WindowProcedure(HWND?hwnd,?UINT?message,?WPARAM?wParam,?LPARAM?lParam)

{

PAINTSTRUCT?ps;

HDC?hdc;

switch?(message)

{

case?WM_PAINT:

hdc?=?BeginPaint(hwnd,?&ps);

TextOut(hdc,?15,?3,?"Hello,?world!",?13);

EndPaint(hwnd,?&ps);

break;

case?WM_DESTROY:

PostQuitMessage(0);

break;

default:

return?DefWindowProc(hwnd,?message,?wParam,?lParam);

}

return?0;

}

基于web圖形用戶界面

Java?applet

Java?applets?work?in?conjunction?with?HTML?files.

HelloWorld?Program?says:

import?java.applet.*;

import?java.awt.*;

public?class?HelloWorld?extends?Applet?{

public?void?paint(Graphics?g)?{

g.drawString("Hello,?world!",?100,?50);

}

}

JavaScript,?aka?ECMAScript

JavaScript?is?a?scripting?language?used?in?HTML?files.?To?demo?this?program?Cut?and?Paste?the?following?code?into?any?HTML?file.

οnclick="javascript:helloWorld();">Hello?World?Example

An?easier?method?uses?JavaScript?implicitly,?calling?the?reserved?alert?function.?Cut?and?paste?the?following?line?inside?the?....?HTML?tags.

Hello?World?Example

An?even?easier?method?involves?using?popular?browsers'?support?for?the?virtual?'javascript'?protocol?to?execute?JavaScript?code.?Enter?the?following?as?an?Internet?address?(usually?by?pasting?into?the?address?box):

javascript:alert('Hello,?world!')

XUL

http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

文檔格式

ASCII

The?following?sequence?of?characters,?expressed?in?hexadecimal?notation?(with?carriage?return?and?newline?characters?at?end?of?sequence):

48?65?6C?6C?6F?2C?20?77?6F?72?6C?64?21?0D?0A

HTML

Hello,?world!

PostScript

/font?/Courier?findfont?24?scalefont

font?setfont

100?100?moveto

(Hello?world!)?show

showpage

TeX

\font\HW=cmr10?scaled?3000

\leftline{\HW?Hello?world}

\bye

總結

以上是生活随笔為你收集整理的a开头的计算机语言,我们刚开始接触计算机语言大多从Hello world 开始的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。