Visit the Ironworks Gaming Website Email the Webmaster Graphics Library Rules and Regulations Help Support Ironworks Forum with a Donation to Keep us Online - We rely totally on Donations from members Donation goal Meter

Ironworks Gaming Radio

Ironworks Gaming Forum

Go Back   Ironworks Gaming Forum > Ironworks Gaming Forums > General Discussion > General Conversation Archives (11/2000 - 01/2005)
FAQ Calendar Arcade Today's Posts Search

 
 
Thread Tools Search this Thread
Old 10-28-2001, 12:57 PM   #31
Moiraine
Anubis
 

Join Date: March 1, 2001
Location: Up in the Freedomland Alps
Age: 59
Posts: 2,474
Quote:
Originally posted by adam warlock:

don't worry you're not alone with that feeling..
I got a 'D' at C++ class over a year ago decided that programming is not my field *shot a glare at one of the brothers*

to be quite frank I get more education from the folks on the 'net rather in the class at campus
Adam Warlock, if you ever need some help in C++, just ask, I'll be happy to help. C++ is really my master skill, you know.

Mirac, I take it you got all the answers you needed ? If you need more help, you too, just ask.



------------------


The world is my oyster !
Moiraine is offline  
Old 10-28-2001, 05:33 PM   #32
Mirac Honorguard
Red Wizard of Thay
 

Join Date: August 21, 2001
Location: Limburg, Netherlands, Europe
Age: 42
Posts: 894
Quote:
Originally posted by Moiraine:
Adam Warlock, if you ever need some help in C++, just ask, I'll be happy to help. C++ is really my master skill, you know.

Mirac, I take it you got all the answers you needed ? If you need more help, you too, just ask.

I will, thanks for the offer Moraine!!



------------------

Lady Menqel, Protector of IW's, smiter of evil

http://www.angelfire.com/rpg2/mirac
- Dualled Swashbuckler/Fighter
- Fellow Table Dancer of the Jerome's Table dancer group
- Spell formulater of the IW peace-keeping force
- Thanks to Sazerac for the great sig picture
Mirac Honorguard is offline  
Old 10-29-2001, 03:42 AM   #33
Zbyszek
Avatar
 

Join Date: August 27, 2001
Location: Poznan, Poland
Posts: 575
If you cant use arrays then i think it is supposed to be done as a list (or tree). (Because to type over 50 variables would be for sure not intention of any teacher). You say that you didnt have arrays (???), has you pointers?

My pascal skills are dead now, I am working with C from 5 years exclusively, but I think I will propose sth.

Btw Lord Shield, your code was more like Basic than Pascal. (Or it was some other strange language?)
Zbyszek is offline  
Old 10-29-2001, 05:14 AM   #34
Zbyszek
Avatar
 

Join Date: August 27, 2001
Location: Poznan, Poland
Posts: 575
OK I modified a little Ertai's code to be able to compile it with very old Borland Pascal 7.0 (but no run-time tests):
(ahh.. that int type I could bet it was in Pascal, but it seems that it has to be Integer )

program Mirac_Honorguard;
var
list_chars: array ['a'..'z'] of Integer;
list_first_apparition: array ['a'..'z'] of Integer;
search_char, temp_char, small_char, big_char: char;
position, small_times, big_times: Integer;

begin

{initializations}
for temp_char:='a' to 'z' do begin
list_chars[temp_char]:=0;
list_first_apparition[temp_char]:=0;
end;
position:=0;
small_times:=maxint;
big_times:=0;

{we read the character that has to be searched, and we check that its a small letter};
write ('Type the character that has to be searched: ');
readln (search_char);
while (not(search_char in ['a'..'z'])) do begin
write ('Error ! Type a small letter: ');
read (search_char);
end;


{we start reading the list of characters (and checking them) until we find a "A"}
repeat
inc (position);
write ('Type a small letter: ');
readln (temp_char);
while (not (temp_char in ['a'..'z'])) do
begin
write ('Error ! Type a small letter: ');
read (temp_char);
end;
{add 1 to the proper character counter}
inc (list_chars[temp_char]);
{save position of the first apparition of the character (if its actually the first)}
if (list_first_apparition[temp_char]=0) then
list_first_apparition[temp_char]:=position;
until temp_char='A';

{get the smallest and biggest characters}
for temp_char:='a' to 'z' do
begin
if (list_chars[temp_char]>big_times) then
begin
big_times:=list_chars[temp_char];
big_char:=temp_char;
end;
if (list_chars[temp_char] < small_times) then
begin
small_times:=list_chars[temp_char];
small_char:=temp_char;
end;
end;

{show the statistics}
write ('The search character [", search_char,"] appears ', list_chars[search_char],' times, ');
writeln ('first time on position ',list_first_apparition[search_char],'.');
write ('The smallest character [', small_char,'] appears ', list_chars[small_char],' times, ');
writeln ('first time on position ',list_first_apparition[small_char],'.');
write ('The biggest character [', big_char,'] appears ', list_chars[big_char],' times, ');
writeln ('first time on position ',list_first_apparition[big_char],'.');

end.

Zbyszek is offline  
Old 10-29-2001, 08:06 AM   #35
DragonMage
20th Level Warrior
 

Join Date: September 6, 2001
Location: The lighter side of life, a.k.a. Newnan, Georgia
Age: 55
Posts: 2,767
Not to interrupt this fascinating lesson, but I just had to say two things:

One - you are all absolutely amazing!!!!

Two - I am SO glad I didn't get into programming afterall!!! *whew*

Good luck, Mirac!

------------------

Alureth...Dragon friend of Breanna, Mage and Advisor in the Court of Lady Lioness

Co-Owner/Operator of the Evil Petting Zoo and devout member of the HADB clan.
Commander of the Dragon Fleet, IW Peacekeeping Force
Sublime Sister of the Illuminati - may the Light shine forever!
Second Historian and Scribe of IW. Mother Hen of IW.
Mage extraordinair, Pin-Up Girl for the OLD-COOTS
Magey-Wagey: performer in the Nekked Dancing Trio of the ORT.

Hopeless Romantic *sigh*
DragonMage is offline  
Old 10-29-2001, 08:45 AM   #36
Xanthul
Symbol of Cyric
 

Join Date: March 1, 2001
Location: Outside my place
Age: 42
Posts: 1,283
Right, its "integer" not "int" . I got confused because now i use Java and C++, i finished learning Pascal last year. Anyway, if mirac says they havent still learned arrays, i doubt they have learned lists or trees. I just think that teacher smoked something

------------------
"Captive, captive... captive in heaven" -Ertai, Captive of the Blinding Angel
Xanthul is offline  
Old 10-29-2001, 10:01 AM   #37
Zbyszek
Avatar
 

Join Date: August 27, 2001
Location: Poznan, Poland
Posts: 575
Quote:
Originally posted by Ertai_OHF:
{we start reading the list of characters (and checking them) until we find a "A"}
repeat
inc (position);
write ("Type a small letter: ");
readln (temp_char);
while (temp_char not in ["a".."z"] do begin
write ("Error ! Type a small letter: ");
read (temp_char);
end;
{add 1 to the proper character counter}
inc (list_chars[temp_char]);
{save position of the first apparition of the character (if its actually the first)}
if (list_first_apparition[temp_char]=0) then
list_first_apparition:=position;
until temp_char="A";
Coming back to your original notation Ertai, I think that code will be unable to get out of this loop (poor Mirac). (while loop will not accept A)

I am unable to link and run it now, but if think that condition in while loop should be

while ( not (temp_char in (['a'..'z']+'A') )) do ...

Zbyszek

Zbyszek is offline  
Old 10-29-2001, 10:57 AM   #38
Xanthul
Symbol of Cyric
 

Join Date: March 1, 2001
Location: Outside my place
Age: 42
Posts: 1,283
SO TRUE !! Sorry about that mistake, its hard to write code without being able to compile or test. Thanks a lot for the warning Zbyszek !!! .

Mirac, let us know when you talk about the problem with your teacher so that we know what kind of structure should you use.

------------------
"Captive, captive... captive in heaven" -Ertai, Captive of the Blinding Angel
Xanthul is offline  
Old 10-31-2001, 06:04 PM   #39
Mirac Honorguard
Red Wizard of Thay
 

Join Date: August 21, 2001
Location: Limburg, Netherlands, Europe
Age: 42
Posts: 894
Quote:
Originally posted by Zbyszek:
Quote:
Originally posted by Ertai_OHF:
{we start reading the list of characters (and checking them) until we find a "A"}
repeat
inc (position);
write ("Type a small letter: ");
readln (temp_char);
while (temp_char not in ["a".."z"] do begin
write ("Error ! Type a small letter: ");
read (temp_char);
end;
{add 1 to the proper character counter}
inc (list_chars[temp_char]);
{save position of the first apparition of the character (if its actually the first)}
if (list_first_apparition[temp_char]=0) then
list_first_apparition:=position;
until temp_char="A";
Coming back to your original notation Ertai, I think that code will be unable to get out of this loop (poor Mirac). (while loop will not accept A)

I am unable to link and run it now, but if think that condition in while loop should be

while ( not (temp_char in (['a'..'z']+'A') )) do ...

Zbyszek

I finished it, but I didn't manage to fix this problem.
Teacher won't care about that I think.
Thanks for your help !!!!!!!

------------------

Lady Menqel, Protector of IW's, smiter of evil

http://www.angelfire.com/rpg2/mirac
- Dualled Swashbuckler/Fighter
- Fellow Table Dancer of the Jerome's Table dancer group
- Spell formulater of the IW peace-keeping force
- Thanks to Sazerac for the great sig picture
- Undead Hunter of Keldorn's Order
Mirac Honorguard is offline  
 


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

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 On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ programming/coding/editing SilentThief General Conversation Archives (11/2000 - 01/2005) 4 01-24-2005 02:24 PM
The Future of Programming -- ROFL! VulcanRider General Conversation Archives (11/2000 - 01/2005) 2 07-31-2003 07:28 PM
Programming... SirTristram General Conversation Archives (11/2000 - 01/2005) 13 11-22-2002 07:11 PM
Programming T/-/alali General Conversation Archives (11/2000 - 01/2005) 4 09-12-2002 04:05 PM
Malicious programming! Sir Kenyth General Conversation Archives (11/2000 - 01/2005) 8 07-04-2002 12:40 AM


All times are GMT -4. The time now is 05:39 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
©2024 Ironworks Gaming & ©2024 The Great Escape Studios TM - All Rights Reserved