-
-
Notifications
You must be signed in to change notification settings - Fork 415
menambahkan contoh Deklarasi multi konstanta #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
menambahkan contoh Deklarasi multi konstanta
link example code novalagung/dasarpemrogramangolang-example#7 |
A-konstanta.md
Outdated
- isToday, termasuk _type inference_ dengan tipe data **bool** dan nilai nya **true** | ||
- square, termasuk _manifest typing_ dengan tipe data **string** dan nilai nya **"kotak"** | ||
- numeric, termasuk _manifest typing_ dengan tipe data **uint8** dan nilai nya **1** | ||
- floatNum, termasuk _type inference_ dengan tipe data **float** dan nilai nya **2.2** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isToday and other consts need to be written as code (isToday
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I would prefer
isToday
dideklarasikan dengan metode type inference dengan tipe data bool dan nilai nya true
instead of
isToday, termasuk type inference dengan tipe data bool dan nilai nya true
A-konstanta.md
Outdated
@@ -39,6 +39,69 @@ Kode di atas menunjukkan perbedaan antara `fmt.Println()` dan `fmt.Print()`. Out | |||
|
|||
Bila menggunakan `fmt.Println()` tidak perlu menambahkan spasi di tiap kata, karena fungsi tersebut akan secara otomatis menambahkannya di sela-sela nilai. Berbeda dengan `fmt.Print()`, perlu ditambahkan spasi, karena fungsi ini tidak menambahkan spasi di sela-sela nilai parameter yang digabungkan. | |||
|
|||
## A.11.2. Deklarasi multi konstanta | |||
|
|||
Sama seperti variabel, konstanta juga dapat di deklarasi secara bersamaan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure sentences has .
suffix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi mas @Fajar-Islami really appreciate the PR thanks! only small reviews related to wording and markdown formatting, if you have the chance please make the adjustment accordingly so I can merge the PR.
A-konstanta.md
Outdated
|
||
Sama seperti variabel, konstanta juga dapat di deklarasi secara bersamaan | ||
|
||
Berikut contoh deklarasi konstanta dengan nilai dan tipe yang berbeda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ensure sentences has . suffix
A-konstanta.md
Outdated
- numeric, termasuk _manifest typing_ dengan tipe data **uint8** dan nilai nya **1** | ||
- floatNum, termasuk _type inference_ dengan tipe data **float** dan nilai nya **2.2** | ||
|
||
Contoh deklarasi konstanta dengan nilai dan tipe yang sama |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need close the sentence using colon character (:
)
A-konstanta.md
Outdated
- a, termasuk _type inference_ dengan tipe data **string** dan nilai nya **"konstanta"** | ||
- b, termasuk _type inference_ dengan tipe data **string** dan nilai nya **"konstanta"** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a and be should be written as a
and b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I would prefer
a
dideklarasikan dengan metode type inference dengan tipe data string dan nilai nya "konstanta"
instead of
a, termasuk type inference dengan tipe data string dan nilai nya "konstanta"
A-konstanta.md
Outdated
- a, termasuk _type inference_ dengan tipe data **string** dan nilai nya **"konstanta"** | ||
- b, termasuk _type inference_ dengan tipe data **string** dan nilai nya **"konstanta"** | ||
|
||
Berikut contoh gabungan dari keduanya |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
colon is needed at the end of sentence
A-konstanta.md
Outdated
) | ||
``` | ||
|
||
- today, termasuk _manifest typing_ dengan tipe data **string** dan nilai nya **"senin"** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const today need to be today
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I would prefer
today
dideklarasikan dengan metode manifest typing dengan tipe data string dan nilai nya "senin"
instead of
today, termasuk manifest typing dengan tipe data string dan nilai nya "senin"
A-konstanta.md
Outdated
- sekarang, termasuk _manifest typing_ dengan tipe data **string** dan nilai nya **"senin"** | ||
- isToday2, termasuk _type inference_ dengan tipe data **bool** dan nilai nya **true** | ||
|
||
Berikut contoh deklrasi _multiple_ konstanta dalam satu baris |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
colon is required
A-konstanta.md
Outdated
const three, four string = "tiga", "empat" | ||
``` | ||
|
||
- satu, termasuk _type inference_ dengan tipe data **int** dan nilai nya **1** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const satu need to be satu
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I would prefer
satu
dideklarasikan dengan metode type inference dengan tipe data int dan nilai nya 1
instead of
satu, termasuk type inference dengan tipe data int dan nilai nya 1
A-konstanta.md
Outdated
- isToday, termasuk _type inference_ dengan tipe data **bool** dan nilai nya **true** | ||
- square, termasuk _manifest typing_ dengan tipe data **string** dan nilai nya **"kotak"** | ||
- numeric, termasuk _manifest typing_ dengan tipe data **uint8** dan nilai nya **1** | ||
- floatNum, termasuk _type inference_ dengan tipe data **float** dan nilai nya **2.2** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I would prefer
isToday
dideklarasikan dengan metode type inference dengan tipe data bool dan nilai nya true
instead of
isToday, termasuk type inference dengan tipe data bool dan nilai nya true
Fixed the sentence of request changes mas noval agung. link example code novalagung/dasarpemrogramangolang-example#7
@Fajar-Islami sorry for super late response, but thanks! |
menambahkan contoh Deklarasi multi konstanta