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-27-2001, 04:50 PM   #11
Moiraine
Anubis
 

Join Date: March 1, 2001
Location: Up in the Freedomland Alps
Age: 59
Posts: 2,474
Quote:
Originally posted by Mirac Honorguard:
Moraine, I like to use your offer. The assignment has been delayed too thursday 1 november. Would you please help me, I can email you the right description and so, but only if you're willing and have the time for it.

Thanks in advance, Mirac

Yes, of course I can help you ! Mail me all. My mail address is in my profile. Sorry for not responding sooner, I had a big nap this afternoon, then went away all evening.


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


The world is my oyster !

[This message has been edited by Moiraine (edited 10-27-2001).]
Moiraine is offline  
Old 10-28-2001, 05:40 AM   #12
Mirac Honorguard
Red Wizard of Thay
 

Join Date: August 21, 2001
Location: Limburg, Netherlands, Europe
Age: 42
Posts: 894
Quote:
Originally posted by Lord Shield:
My Pascal is over a decade old but have some pseudo-code:

this will sort out the input letter queries:

inp_char = 1st parameter
search_String = 2nd parameter (string of letters)

wl_inp_pos = 0
wl_inp_count = 0

for a% = 1 to length(search_string)
if seg$(search_string,a%,1) = inp_char then
if wl_inp_count = 0% then
wl_inp_pos = position(this_char) !!position of first char found
end if
wl_inp_count = wl_inp_count + 1 !!counter for no. of times found
end if
next a%


hope this helps

This is the 3GL solution anyway



WOOOOW, I didn't know this was Pascal code. If I sent this to my teacher he'll get suspicious about my capacities.
All your help is appreciated and will be used!!!!

THANKS!!



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

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-28-2001, 06:04 AM   #13
Zbyszek
Avatar
 

Join Date: August 27, 2001
Location: Poznan, Poland
Posts: 575
Sorry but like Lord Shield said it was pseudocode, not Pascal code. I havent used Pasal from 5 years.

BUT this is use of if instruction:
if (condition_true) then
{ program_statement; }

if (condition_true) then
{program_statement;}
else {program_statement;}

I guess you have also read your data from file or keyboard. In Lord Shield code he assumed that he already has whole sequence in one string.

I will repeat - Lord Shield code is pseudocode - do not show it to teacher
Zbyszek is offline  
Old 10-28-2001, 07:58 AM   #14
Mirac Honorguard
Red Wizard of Thay
 

Join Date: August 21, 2001
Location: Limburg, Netherlands, Europe
Age: 42
Posts: 894
Quote:
Originally posted by Zbyszek:
Sorry but like Lord Shield said it was pseudocode, not Pascal code. I havent used Pasal from 5 years.

BUT this is use of if instruction:
if (condition_true) then
{ program_statement; }

if (condition_true) then
{program_statement;}
else {program_statement;}

I guess you have also read your data from file or keyboard. In Lord Shield code he assumed that he already has whole sequence in one string.

I will repeat - Lord Shield code is pseudocode - do not show it to teacher
LOL, I think my teacher would LHAO

Thanks for the advice


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

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-28-2001, 08:07 AM   #15
Xanthul
Symbol of Cyric
 

Join Date: March 1, 2001
Location: Outside my place
Age: 42
Posts: 1,283
Mirac im writing it right now, i think ill finish it in a few minutes and post here. Anyway i dont have TP now, so im writing it in the notepad, maybe it will have some compilation errors but they´ll be easy to fix (for example missing ";" and that kind of things).

------------------
"Captive, captive... captive in heaven" -Ertai, Captive of the Blinding Angel
Xanthul is offline  
Old 10-28-2001, 08:17 AM   #16
Xanthul
Symbol of Cyric
 

Join Date: March 1, 2001
Location: Outside my place
Age: 42
Posts: 1,283
Here you are, if you have any question about the code, just ask

program Mirac_Honorguard;

var
list_chars: array ["a".."z"] of int;
list_first_apparition: array ["a".."z"] of int;
search_char, temp_char, small_char, big_char: char;
position, small_times, big_times: int;

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 (search_char not 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 (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";

{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] -smaller_than 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.


------------------
"Captive, captive... captive in heaven" -Ertai, Captive of the Blinding Angel

[This message has been edited by Ertai_OHF (edited 10-28-2001).]
Xanthul is offline  
Old 10-28-2001, 08:20 AM   #17
Melusine
Dracolisk
 

Join Date: January 8, 2001
Location: Amsterdam, The Netherlands
Age: 43
Posts: 6,541


*slinks away quietly, baffled*



------------------
Melusine, Sultry Elflet,
High Queen of Fluffies,
Archbabe of the OHF,
LH, HADB and ORT!

Your voice is ambrosia
Amy Brown Fantasy Art
Melusine is offline  
Old 10-28-2001, 08:25 AM   #18
Xanthul
Symbol of Cyric
 

Join Date: March 1, 2001
Location: Outside my place
Age: 42
Posts: 1,283
Where it says -smaller_than, it should be the "smaller than" symbol (the opposite of ">"), but i couldnt type it here coz the board treats it like a HTML tag and it messes the whole text).

------------------
"Captive, captive... captive in heaven" -Ertai, Captive of the Blinding Angel
Xanthul is offline  
Old 10-28-2001, 09:28 AM   #19
adam warlock
Ma'at - Goddess of Truth & Justice
 

Join Date: January 7, 2001
Location: I live inside of my mind.....
Age: 53
Posts: 3,234
Quote:
Originally posted by Melusine:


*slinks away quietly, baffled*




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


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


Realm of Warlock's Art
The Host of Sigs - who's your daddy now?
I bow to Ziroc the grand master! I shall never mock Choc again!
adam warlock is offline  
Old 10-28-2001, 10:36 AM   #20
Lord Shield
Guest
 

Posts: n/a
Quote:
Originally posted by Ertai_OHF:
Where it says -smaller_than, it should be the "smaller than" symbol (the opposite of ">"), but i couldnt type it here coz the board treats it like a HTML tag and it messes the whole text).

I did wonder

yeh, it's annoying it leaves out indented spaces in code too - makes it more readable

------------------
Lord Raptor's Site


Ironworks Dark General
BG2 Tavern Keeper
King of Pointlessness
 
 


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 03:20 AM.


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