This presentation is the property of its rightful owner.
Sponsored Links
1 / 24

ภาษาคอมพิวเตอร์ PowerPoint PPT Presentation


  • 114 Views
  • Uploaded on
  • Presentation posted in: General

ภาษาคอมพิวเตอร์. เรื่อง ภาษาชั้นสูงมาก ( Very high - Level Language). ภาษาคอมพิวเตอร์. ภาษาใดๆที่ผู้ใช้งานใช้สื่อสารกับคอมพิวเตอร์หรือคอมพิวเตอร์ด้วยกัน แล้วคอมพิวเตอร์สามารถทำงานตามคำสั่งนั้นได้. ลักษณะของภาษาคอมพิวเตอร์.

Download Presentation

ภาษาคอมพิวเตอร์

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


3973582

(Very high - Level Language)


3973582


3973582

1.

2.

3.

4. /


Very high level language

(Very high - Level Language)

4 (4GLs:Fourth Generation Languages)3

3 4 Informix-4GL, Focus, Sybase, InGres


4 gls

4GLs

Nonprocedural (Editor) 3 Procedural


4 gls1

4GLs

4GLs 4GLs 4GLs 4GLs


4 gls fourth generation languages

4GLs(Fourth Generation Languages)

4GLs 3

  • (Report Generators)

    (Report Writer) (end - users) (format)


4 gls2

4GLs

  • (Query Languages)

    SQL (Structured Query Language) QBE (Query - By - Example) Intellect

  • (Application Generators)

4GLs 4GLs 3


4 gls3

4GLs

  • 3

  • 1 4GL

    3 100

  • Interactive


3973582

4GLs

4 4


3973582


4 gls4

4GLs

Visual Basic (VB) Visual Basic (Controls) Graphic User Interface (GUI)


Very high level language1

(Very high - Level Language)

Visual Basic.Net


3973582

  • C Name btnCLR

  • 7 "---------------" btn_Num_7

  • 8 "---------------" btn_Num_8

  • 9 "---------------" btn_Num_9

  • 4 "---------------" btn_Num_4

  • 5 "---------------" btn_Num_5

  • 6 "---------------" btn_Num_6

  • 1 "---------------" btn_Num_1

  • 2 "---------------" btn_Num_2

  • 3 "---------------" btn_Num_3

  • 0 "---------------" btn_Num_0

  • . "dot------" btnNumPeriod

  • + "-----------" btn_Operator_Add

  • - "------------" btn_Operator_Subt

  • x "------------" btn_Operator_Multi

  • / "------------" btn_Operator_div

  • = "---------" btnCalculate


3973582

Public Class Form1

Inherits System.Windows.Forms.Form

Private Var1 As Double

Private var2 As Double

Private Temp As Double

Private Memory As Double

Private period As Boolean

Private [Operator] As String

Private Status As Boolean


3973582

7

Private Sub btn_Num_7_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btn_Num_7.Click

If Status = False Then

TextBox1.Text = TextBox1.Text + CStr(7)

Else

TextBox1.Text = 7

Status = False

End If

End Sub

CStr(7) TextBox1.Text = 7


3973582

. (dot )

Private Sub btnNumPeriod_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btnNumPeriod.Click

If Status = False Then

If period = False Then

If TextBox1.Text.Length > 0 Then

TextBox1.Text = TextBox1.Text + "."

Else

TextBox1.Text = "0."

End If

period = True

End If

End If


3973582

+

Private Sub btn_Operator_Add_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btn_Operator_Add.Click

If TextBox1.Text.Length <> 0 Then

If [Operator] = "" Then

Var1 = CDbl(TextBox1.Text)

TextBox1.Text = ""

Else

Calculate()

End If

[Operator] = "Add"

period = False

End If

End Sub


3973582

-

Private Sub btn_Operator_Subt_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btn_Operator_Subt.Click

If TextBox1.Text.Length <> 0 Then

If [Operator] = "" Then

Var1 = CDbl(TextBox1.Text)

TextBox1.Text = ""

Else

Calculate()

End If

[Operator] = "Sub"

period = False

End If

End Sub


3973582

x

Private Sub btn_Operator_Multi_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btn_Operator_Multi.Click

If TextBox1.Text.Length <> 0 Then

If [Operator] = "" Then

Var1 = CDbl(TextBox1.Text)

TextBox1.Text = ""

Else

Calculate()

End If

[Operator] = "Mult"

period = False

End If

End Sub


3973582

/

Private Sub btn_Operator_div_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btn_Operator_div.Click

If TextBox1.Text.Length <> 0 Then

If [Operator] = "" Then

Var1 = CDbl(TextBox1.Text)

TextBox1.Text = ""

Else

Calculate()

End If

[Operator] = "Div"

period = False

End If

End Sub


3973582

C

Private Sub btnCLR_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btnCLR.Click

TextBox1.Text = ""

Var1 = 0

var2 = 0

[Operator] = ""

period = False

End Sub


3973582

=

Private Sub btnCalculate_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles btnCalculate.Click

If TextBox1.Text.Length <> 0 AndAlso Var1 <> 0 Then

Calculate()

[Operator] = ""

period = False

End If

End Sub


3973582

  • Public Sub Calculate()

  • var2 = CDbl(TextBox1.Text)

  • If [Operator] = "Add" Then

  • Var1 = Var1 + var2

  • ElseIf [Operator] = "Sub" Then

  • Var1 = Var1 - var2

  • ElseIf [Operator] = "Mult" Then

  • Var1 = Var1 * var2

  • ElseIf [Operator] = "Div" Then

  • Var1 = Var1 / var2

  • ElseIf [Operator] = "Sqrt" Then

  • Exit Sub

  • ElseIf [Operator] = "Pow" Then

  • Var1 = System.Math.Pow(Var1, var2)

  • ElseIf [Operator] = "Inve" Then

  • Exit Sub

  • End If

  • TextBox1.Text = CStr(Var1)

  • Status = True

  • End Sub


  • Login