Register | Login
Forum Index > Source Help > Pascal plugIn
Author Message
Pages: 1 2
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[499] - posted: 2011-11-09 14:58:50

else for params you check for token ( - zirOpenParen


oh , i was asking about how plugIn can know if the function is a pascal function or
a Ziron one.

i have found out that , pascal may contain ':' in parameters , so i searched in parameters
for ":" to know it is a pascal one , the problem here is , if pascal function have no parameters term , how can i solve that ?

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[501] - posted: 2011-11-09 15:03:35
yes you can chack ( ident colon = if false, not pascal proc

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[503] - posted: 2011-11-09 15:05:48

oh sorry i do not get you well?

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[505] - posted: 2011-11-09 16:22:30
pseudo code:

Code:
Ziron_ExpectNextToken(zirOpenParen);
if (eax ...

Ziron_ExpectNextToken(zirIdent);
if (eax ...

Ziron_ExpectNextToken(zirColon);
if (eax == zirUnexpected) {
    //not a pascal type function
}

//else we need next to expect a datatype


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[507] - posted: 2011-11-09 17:11:30

ok , paresing line to see if it has a ':' or not is not the problem here.

suppose you have a pascal function that has no parameters at all , when paresing it to find
':' you will not find it so you consider it as a non pascal function and that is not true.

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[508] - posted: 2011-11-09 17:14:36
without parameters it does not need to be converted to a pascal procedure since it is the same as a ziron procedure, so i do not see the problem...


pascal proc:
Code:
procedure MyProcedure;
begin
   //code
end;


ziron proc:
Code:
procedure MyProcedure {

}


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[510] - posted: 2011-11-09 17:28:49

oh , it's ok now.

http://www.freewebs.com/ogremagic/index.htm
Pages: 1 2
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 12 user(s) online. 0 member(s) and 12 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd