Skip to content

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

Merged
merged 5 commits into from
Sep 23, 2022

Conversation

Fajar-Islami
Copy link
Contributor

menambahkan contoh Deklarasi multi konstanta

menambahkan contoh Deklarasi multi konstanta
@Fajar-Islami
Copy link
Contributor Author

link example code novalagung/dasarpemrogramangolang-example#7

A-konstanta.md Outdated
Comment on lines 57 to 60
- 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**
Copy link
Owner

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)

Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ensure sentences has . suffix

Copy link
Owner

@novalagung novalagung left a 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
Copy link
Owner

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
Copy link
Owner

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
Comment on lines 73 to 74
- a, termasuk _type inference_ dengan tipe data **string** dan nilai nya **"konstanta"**
- b, termasuk _type inference_ dengan tipe data **string** dan nilai nya **"konstanta"**
Copy link
Owner

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

Copy link
Owner

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
Copy link
Owner

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"**
Copy link
Owner

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

Copy link
Owner

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
Copy link
Owner

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**
Copy link
Owner

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

Copy link
Owner

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
Comment on lines 57 to 60
- 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**
Copy link
Owner

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

@novalagung novalagung merged commit 73f0edf into novalagung:master Sep 23, 2022
@novalagung
Copy link
Owner

@Fajar-Islami sorry for super late response, but thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants