Share this topic on Del.icio.usShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on SlashdotShare this topic on StumbleUponShare this topic on TechnoratiShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: Syntax Highlighter  (Read 2570 times)

0 Members and 1 Guest are viewing this topic.

Offline 1nf0rm4t1c5

  • Administrator
  • *
  • Posts: 1090
  • Reputasi: 15
  • Informatics Developer

  • Aktivitas bulan ini
    4%
    • Forum Informatika
  • Lokasi: Indonesia
  • Jenis Kelamin: Laki-laki
Syntax Highlighter
« on: 31 March 2009, 11:20:45 »
Alhamdulillah, barusan melakukan instalasi satu mod baru dengan nama Syntax Highlighter

Berfungsi untuk memberikan highlight atau pewarnaan khusus pada kode2 pemrograman yang ditulis.

Beberapa bhs pemrograman yang telah didukung.

Nama|Kode
Cold Fusion
Cpp
CSharp
Css
Delphi
Java
JScript
Perl
Php
PlSql
Python
Ruby
Sql
Visual Basic 6
Visual Basic .NET
Xml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ColdFusion
Cpp atau c++
CSharp atau c#
Css
Delphi
Java
JScript
Perl
Php
PlSql
Python
Ruby
Sql
Vb
vb.net
Xml

Cara Pemakaian:

Contoh potongan kode dalam Visual Basic 6

Code: [Select]
' Halo Forum Informatika dalam Visual Basic 6

Private Sub Form_Load()
Print "Halo Forum Informatika"
End Sub

Maka dalam tag [ CODE ] tambahkan =kode dari bhs pemrograman

[ code=kodeBahasa] kode Anda di sini[/ code]

Contoh lengkap:

Code: [Select]
[ code=vb]
' Halo Forum Informatika dalam Visual Basic 6

Private Sub Form_Load()
Print "Halo Forum Informatika"
End Sub
[/ code]

Hasilnya:

Code: (vb) [Select]
' Halo Forum Informatika dalam Visual Basic 6

Private Sub Form_Load()
Print "Halo Forum Informatika"
End Sub


CARA TERCEPAT!

- Tulis kodenya
- Blok kode tersebut
- Klik pada menu (toolbar) ada combobox Syntax Highlighting, pilih salah satu, seperti terlihat pada gambar di bawah ini:

« Last Edit: 24 April 2009, 23:35:35 by 1nf0rm4t1c5 »
Full access for guest [REGISTER]
Please read the rule [RULES]
Promosi?  [STEP-BY-STEP]

RAR PASSWORD : http://if.web.id --> buat buka file rar

Forum Informatika

Syntax Highlighter
« on: 31 March 2009, 11:20:45 »
Sponsored Links:


Offline 1nf0rm4t1c5

  • Administrator
  • *
  • Posts: 1090
  • Reputasi: 15
  • Informatics Developer

  • Aktivitas bulan ini
    4%
    • Forum Informatika
  • Lokasi: Indonesia
  • Jenis Kelamin: Laki-laki
Re: Syntax Highlighter
« Reply #1 on: 31 March 2009, 11:29:42 »
Code: (java) [Select]
/**
 * The HelloWorldApp class implements an application that
 * simply prints "Hello World!" to standard output.
 */
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!"); // Display the string.
    }
}

Code: (csharp) [Select]
// Hello World in Microsoft C# ("C-Sharp").

using System;

class HelloWorld
{
    public static int Main(String[] args)
    {
        Console.WriteLine("Hello, World!");
        return 0;
    }
}

Code: (cpp) [Select]
// Hello World in C++ (pre-ISO)

#include <iostream.h>

main()
{
    cout << "Hello World!" << endl;
    return 0;
}
</iostream.h>

Code: (pascal) [Select]
{Hello World in Pascal}

program HelloWorld(output);
begin
  WriteLn('Hello World!');
end.

Code: (php) [Select]
  // Hello World in PHP
  echo 'Hello World!';
?>

Code: (php) [Select]
// Hello World in PHP + GD library
header("Content-type: image/gif");
$rscImage    = imagecreatetruecolor(80, 25);
$intFontC    = imagecolorallocate($rscImage, 255, 255, 255);
$intBGC        = imagecolorallocate($rscImage, 0, 0, 0);
imagestring($rscImage, 2, 5, 5, "Hello World!", $intFontC);
imagegif($rscImage);
imagedestroy($rscImage);
?>

Code: (python) [Select]
# Hello World in Python
print "Hello World"

Code: (sql) [Select]
# Hello World in SQL

SELECT 'Halo dunia';

Code: (sql) [Select]
SELECT nama, alamat
FROM biodata
WHERE nama LIKE "adi%"

Code: (vb.net) [Select]
'Hello World in Visual Basic .NET (VB.NET)

Imports System.Console

Class HelloWorld

    Public Shared Sub Main()
        WriteLine("Hello, world!")
    End Sub

End Class
« Last Edit: 31 March 2009, 11:32:44 by 1nf0rm4t1c5 »
Full access for guest [REGISTER]
Please read the rule [RULES]
Promosi?  [STEP-BY-STEP]

RAR PASSWORD : http://if.web.id --> buat buka file rar

Offline 1nf0rm4t1c5

  • Administrator
  • *
  • Posts: 1090
  • Reputasi: 15
  • Informatics Developer

  • Aktivitas bulan ini
    4%
    • Forum Informatika
  • Lokasi: Indonesia
  • Jenis Kelamin: Laki-laki
Re: Syntax Highlighter
« Reply #2 on: 31 March 2009, 13:04:46 »
Beberapa bugs yang kami temukan:

  • Penggunaan tag <br> masih bisa dieksekusi oleh sistem, jadi bukan dianggap potongan kode.
    Solusi: Jangan tulis <br>, tapi tulis saja < br>. (ada spasi)
  • Penggunaan tag <html> dan <?php , tidak dimunculkan. Mungkin karena dianggap tidak perlu.
    Jika Anda ingin memunculkannya, maka tinggal menulis < html> atau < ?php (ada spasi)
  • Baru ditemukan: Dalam code Anda, di awal syntax, ganti tanda < dengan &lt;

Yang lain menyusul...  ;)
« Last Edit: 30 April 2009, 13:27:17 by 1nf0rm4t1c5 »
Full access for guest [REGISTER]
Please read the rule [RULES]
Promosi?  [STEP-BY-STEP]

RAR PASSWORD : http://if.web.id --> buat buka file rar

Offline lumine

  • Developer IF
  • *
  • Posts: 519
  • Reputasi: 9

  • Aktivitas bulan ini
    0%
Re: Syntax Highlighter
« Reply #3 on: 31 March 2009, 15:28:26 »
manteps...