Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Pascal/Delphi

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

Pascal/Delphi Forum for discussing Borland Delphi and Pascal coding techniques, tips and tricks.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-27-2007, 02:32 AM
Krad Krad is offline
Newbie
 
Join Date: Nov 2007
Posts: 2
Credits: 0
Rep Power: 0
Krad is on a distinguished road
Default [Pascal in Delphi]System to system

Hi! I can't do a simple program in Pascal... I need to program which change any system for example dec, hex... to other system for example binary code, but (in program) i must give this system:

begginig
"Please give a system:" for example 2
"Please give second system:" for. ex. 16
"Give me a value:" 01001

"Value is..."

And now it change me from binary to 16 system a value 01001.
How it write?
Sorrry for my English but it isn't good in computers. Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 11-27-2007, 11:10 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,453
Last Blog:
wxWidgets is NOT code ...
Credits: 761
Rep Power: 28
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

First question: can you do this with a pencil and paper?
When I did this program, my strategy was go from base A to decimal to base B.
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-27-2007, 12:46 PM
Krad Krad is offline
Newbie
 
Join Date: Nov 2007
Posts: 2
Credits: 0
Rep Power: 0
Krad is on a distinguished road
Default

Uhm... no. I do it in Delphi.
Code for change a other system to binary:

Code:
program NaDowolnySystem;

{$APPTYPE CONSOLE}

const
SYSTEM='0123456789ABCDEFGHIJKLMNOPRSTUWXYZ';
var
wynik:string;
NaSystem,JakaLiczba:integer;
begin
  repeat
    write('What system (max 34): ');
    readln(NaSystem);
  until NaSystem in [2..34];
  write('Give value: ');
  readln(JakaLiczba);
  repeat
    wynik:=SYSTEM[JakaLiczba mod NaSystem+1] + wynik;
    JakaLiczba:=JakaLiczba div NaSystem;
  until JakaLiczba=0;
  writeln('Wynik: ',wynik);
  readln;
end.
But I need program in two side - from other system to other (not binary) AND change loop 'repeat' on FOR.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-28-2007, 10:26 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 2,453
Last Blog:
wxWidgets is NOT code ...
Credits: 761
Rep Power: 28
WingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the roughWingedPanther is a jewel in the rough
Default

Krad, my point was that if you can't do the conversions by hand, then you will NEVER be able to program the conversions. Do you know how to do the conversions by hand?
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 12-16-2007, 11:24 AM
t3chn0n3rd t3chn0n3rd is offline
Newbie
 
Join Date: Dec 2007
Posts: 2
Credits: 0
Rep Power: 0
t3chn0n3rd is on a distinguished road
Default Pascal compiler

Are you using a borland compiler?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 12-27-2007, 01:35 PM
olegator olegator is offline
Newbie
 
Join Date: Dec 2007
Posts: 1
Credits: 0
Rep Power: 0
olegator is on a distinguished road
Default

If you using a borland compiler, you can use function: IntToBin, IntToHex, BinToHex etc.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows XP Tricks & Tips!!!!..new ones. pranky Tutorials 9 08-23-2008 03:22 PM
Operating System prnoct90 General Programming 6 11-01-2007 10:56 PM
Free Account creator and Billing system xtraze The Lounge 1 01-16-2007 02:17 PM
Project: vBulletin Alert System (vbAS) Crane Community Projects 18 12-13-2006 10:54 AM
Store and Points System Jordan Announcements 9 08-28-2006 01:38 PM


All times are GMT -5. The time now is 11:22 PM.

Contest Stats

Xav ........ 1276.19
MeTh0Dz|Reb0rn ........ 1048.58
marwex89 ........ 869.98
John ........ 868.39
morefood2001 ........ 868.04
WingedPanther ........ 761.06
Brandon W ........ 684.87
chili5 ........ 294.12
Steve.L ........ 216.18
dargueta ........ 192.86

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 81%

Ads