Rabu, 12 November 2008

JENIS-JENIS NAMA INTEGER DALAM BAHASA PEMROGRAMAN

Dalam bahasa pemrograman C
Tipe integer standar yang digunakan dalam bahasa C adalah tipe int. Ukuran dan jangkauan data dari tipe int seringkali tergantung dari kompilator dan komputer yang digunakan, tapi biasanya setara dengan short int atau long int.

Selain tipe int, ada beberapa tipe data lain yang dapat menampung bilangan bulat, di antaranya:
char. Sebenarnya tipe data ini digunakan untuk menyimpan karakter dalam kode ASCII, tapi dapat juga digunakan untuk menyimpan integer dari 0 sampai 255
short int, ukuran 2 byte, jangkauan -32,768 sampai 32,767
long int, ukuran 4 byte, jangkauan -2,147,483,648 hingga 2,147,483,647
Tipe-tipe data di atas dapat menyimpan integer negatif dan positif. Untuk menyimpan bilangan positif dan nol saja, dapat digunakan kata kunci unsigned sebelum tipe data. Sebagai contoh:

unsigned short int, ukuran 2 byte, jangkauan 0 sampai 65,535
unsigned long int, ukuran 4 byte, jangkauan 0 sampai 4,294,967,295

Dalam bahasa pemrograman Pascal
Dalam bahasa Pascal, integer mampu menampung 16-bit Walaupun memiliki ukuran 2 byte (16 bit) tetapi karena integer adalah type data signed maka hanya mampu di-assign nilai antara -215 hingga 215-1 yaitu -32768 sampai 32767. Ini disebabkan karena 1 bit digunakan sebagai penanda positif/negatif. Meskipun memiliki istilah yang sama, tetapi tipe data integer pada bahasa pemrograman Visual Basic.NET dan Borland Delphi memiliki ukuran 4 byte atau 32 bit signed sehingga dapat di-assign nilai antara -2,147,483,648 hingga 2,147,483,647.

Selain tipe integer, bahasa Pascal juga memiliki beberapa tipe lain:

byte, ukuran 1 byte, jangkauan dari 0 sampai 255
smallint, ukuran 1 byte, jangkauan dari -128 sampai 127
word, ukuran 2 byte, jangkauan dari 0 sampai 65,535
Pada kompilator Pascal yang lebih baru, juga dikenal tipe-tipe data yang lebih besar seperti:

longint, ukuran 4 byte, jangkauan dari -2,147,483,648 sampai 2,147,483,647
cardinal, ukuran 4 byte, jangkauan dari 0 sampai 4,294,967,295

Dalam bahasa pemrograman Borland Delphi
Borland Delphi : smallint

Dalam bahasa pemrograman Visual Basic .NET
Visual Basic.NET : short

Dalam bahasa pemrograman C#

Perbandingan nama tipe data bilangan bulat dalam bahasa pemrograman C# dan Microsoft .NET FrameworkDalam bahasa pemrograman C#, terdapat beberapa variasi dari tipe data integer, yakni:

byte: bilangan bulat tak bertanda (unsigned integer) 8-bit. Ekuivalen dengan tipe data System.Byte dalam Microsoft .NET Framework.
sbyte: bilangan bulat bertanda (signed integer) 8-bit. Ekuivalen dengan tipe data System.Sbyte dalam Microsoft .NET Framework.
short: bilangan bulat bertanda 16-bit. Ekuivalen dengan tipe data System.Int16 dalam Microsoft .NET Framework.
ushort: bilangan bulat tak bertanda (unsigned integer) 16-bit. Ekuivalen dengan tipe data System.UInt16 dalam Microsoft .NET Framework.
int: bilangan bulat bertanda (signed integer) 32-bit. Ekuivalen dengan tipe data System.Int32 dalam Microsoft .NET Framework.
uint: bilangan bulat tak bertanda (unsigned integer) 32-bit. Ekuivalen dengan tipe data System.UInt32 dalam Microsoft .NET Framework.
long: bilangan bulat bertanda (signed integer) 64-bit. Ekuivalen dengan tipe data System.Int64 dalam Microsoft .NET Framework.
ulong: bilangan bulat tak bertanda (unsigned integer) 64-bit. Ekuivalen dengan tipe data System.UInt64 dalam Microsoft .NET Framework.

Tidak ada komentar:

my picture

my picture

G3neRal TIPs to be SMart


Here are a few general tips to keep in mind when you start student teaching.

Be flexible. Even the best plans for lessons, projects and homework sometimes just don’t go as you expected. Try to keep things flexible so you won’t be completely derailed when students don’t respond the way you hope.

Prepare for the unexpected. Along those same lines, when the unexpected does happen, make sure you’re ready for it. Keep a few backup lessons on hand so you won’t be left out in the cold if you need something to keep your students busy.

Learn from other teachers. You’re student teaching in order to get an idea of how to teach, so what better way to supplement your experience than to ask questions and learn from those who are already in the field?

Talk to parents. Learning to work with parents can be difficult, but it’s a necessary component of being a teacher. Make sure to keep parents informed of their child’s progress.
Share your personal skills.


Each person brings a different set of skills to the table when they start student teaching. For instance, if you’re a great artist, try incorporating art into your student’s lessons.

Watch what you say. Those just entering student teaching can have a hard time remembering that what they say and do must be closely monitored, both in front of students and other faculty members. You never know what could come back to bite you, so keep your comments to yourself when at school or in public.

Learn to prioritize. This can be a good rule for life in general, but it’s especially important when you’re teaching students. Figure out what parts of the lessons are most important and concentrate your energy on those.

Find out how your school is run. You’ll make things a lot easier on yourself by figuring out the little day to day operations of the school you’ll be working for. Speak with administrators and cooperating teachers to get the information you’ll need to keep things running smoothly.

Plan, plan, plan. When you’re starting out in teaching, you can’t ever plan too much. While it may seem tedious to spend hours planning out every detail of your classes, it can be a good way to keep you feeling confident until you really get the hang of teaching.

Create simple rules. The best rules are those that are easy for your students to remember. Keep things simple and lay out some simple guidelines for students to follow to keep them well-behaved and attentive during class.
Focus on what you do know. Student teachers and those just starting out in the field will sometimes feel like what they don’t know far outweighs what they do know. However true this may be, try focusing on what you do know instead. The rest will come in time.

Don’t try to do it all at once. Many student teachers go into their classrooms with a million ideas for lessons. However, you’ll give yourself a heart attack running around trying to do all the things you want to do at one time, so focus on fully exploring a few of your ideas at a time.

Ask questions. Don’t know something? Just ask. Those around you are there to help, so take advantage of their experience and knowledge as you work through your student teaching.

Learn about the experience. While reading doesn’t compare to real life experience, it can help prepare you and give an idea of what to expect. Read articles and books about student teaching to help prepare you for the months to come.

Enjoy it! At the end of the day, student teaching should be a fun and rewarding experience. Make sure you’re not so wrapped up in doing well that you aren’t taking the time to truly enjoy and appreciate it.