Go Linux Practice 1

Source: Internet
Author: User

Introduction:

If, once, you are proud to be a C app developer, then you should use C + + to develop into the fashion, when Java appears, you may say, "This boy, there are two!" ”

However, when you go to the Java Expert Factory, haha, back to face java/c++/c, estimated that you have vomited a ground, haha haha

So, where the Western powers say such a word, "the 90 generation of OOP (object-oriented programming) is nonsense!" ”

hahaha, I guess, you have fallen down, hahaha, no relationship, let us look forward, resolutely go, let's go!

*************************************************************************************************************

Online paragraph to see if you have any help with indecision

[

The strict structural principles of the Go language and its "one thing has and only one way to complete" thinking
means we don't have to dwell on style issues. In the code review for the Go Language program, the audit
It becomes more about the problem, not the intricacies of the language, which everyone wants to see.

]

Look, our demo bar:

Package Main

Import
"FMT"
"Math"
"Math/rand"
)

Func Add (x int, y int) int{
Return X+y
}

Func Sub (x, y int) int{
return x-y
}

Func swap (x, y String) (string, string) {
return y, X
}

Func split (sum int) (x, y int) {
x = SUM*4/9
y = sum-x
Return
}

var c, Python, Java bool

Func Main () {
Fmt. Printf ("Now you have%g problems.\n", Math. SQRT (7))
Fmt. Println ("My favorite number is", Rand. INTN (10))
var u64 uint64 = 1<<64-1
Fmt. Printf ("%d%d\n", U64, Int64 (U64))
Fmt. Println (Add (42, 13))
Fmt. Println (Sub (42, 13))
A, B:=swap ("Hello", "World")
Fmt. Println (A, B)
Fmt. Println (Split (17))
var i int;
Fmt. Println (i, C, Python, Java)
var B1, b2, S = True, False, "HW"
Fmt. Println (B1, B2, s)
K: = 3

Fmt. Println (k)

}

Finally:

Simple enough, huh?

I thought that if you didn't come all the way through the introduction, maybe you couldn't see the beauty of go.

Haha, but one day you will grow up, involuntarily ah, hahaha

Go Linux Practice 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.