NOTES about below scripts:
1. Python's should be written in its CLI
2. REBOL's should be written in its CLI
3. JAVASCRIPT should be written in a windows 7 notepad, inside <script> and </script> tags
4. VBA should be written on Visual Basic Editor on Microsoft Excel
5. C should be written on .....
VARIABLE DECLARATION
On REBOL:
No need
On Python:
No need
On C:
On Javascript:
Conditional statement(IF)
: Make decision
General task:
- define the condition to be evaluated
- define one or more statements to run
Looping Statment / Control structures
: Repeat actions (for how long, until what)
FOR
On REBOL
On VBA
For i = 0 to 10
>> cetak: func [kata][print kata]
>> cetak ("yoss....")
yoss...
*** Rebol tidak perlu mendefinisikan var printer atau kata terlebih dahulu***
***use func keyword***
Via Javascript
var printer: function(kata){
alert kata
}
Via PYTHON
>>> def cetak(kata):
print kata
return
>>> cetak('yuyu hakuso')
yuyu hakuso
>>> cetak('aloha')
aloha
*** Sama seperti REBOL, Python tidak perlu mendefinisikan variabel printer atau variabel kata terlebih dahulu***
Via VBA (Microsoft Excel)
Writing editor on Visual Basic Editor (tekan ALT+F11):
1. Insert new module
2. Insert below code
Function cetak()
cetak = "Aloha"
End Function
1. Python's should be written in its CLI
2. REBOL's should be written in its CLI
3. JAVASCRIPT should be written in a windows 7 notepad, inside <script> and </script> tags
4. VBA should be written on Visual Basic Editor on Microsoft Excel
5. C should be written on .....
VARIABLE DECLARATION
On REBOL:
No need
On Python:
No need
On C:
On Javascript:
Conditional statement(IF)
: Make decision
General task:
- define the condition to be evaluated
- define one or more statements to run
Looping Statment / Control structures
: Repeat actions (for how long, until what)
FOR
On REBOL
On VBA
For i = 0 to 10
USER DEFINED FUNCTION
Via REBOL>> cetak: func [kata][print kata]
>> cetak ("yoss....")
yoss...
*** Rebol tidak perlu mendefinisikan var printer atau kata terlebih dahulu***
***use func keyword***
Via Javascript
var printer: function(kata){
alert kata
}
Via PYTHON
>>> def cetak(kata):
print kata
return
>>> cetak('yuyu hakuso')
yuyu hakuso
>>> cetak('aloha')
aloha
*** Sama seperti REBOL, Python tidak perlu mendefinisikan variabel printer atau variabel kata terlebih dahulu***
Via VBA (Microsoft Excel)
Writing editor on Visual Basic Editor (tekan ALT+F11):
1. Insert new module
2. Insert below code
Function cetak()
cetak = "Aloha"
End Function
No comments:
Post a Comment