Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
richardneail
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 15:24
Is there a max number of IF statements you can have in a program ?

Rich

You might never win but if you give in will you ever know ??????
Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 14th Nov 2003 15:38 Edited at: 14th Nov 2003 15:40
There's probably a max that you indent them (see example), but there should not be a limit on the number of IF/thens statements that can be used in your program.



Kevin Picone
Play Basic - Visible Worlds - Kyruss II
[url]www.underwaredesign.com[/url]
richardneail
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 16:12
Hmmmmmmmmmmm, will have to think about this, it's just I have added four new if statements to my program and now it doesnt work proper.

Remove the statements and it works, it seems to clash with a sub routine I have as if u dont call it and you leave the IF statements in it works.

I have been through the code with a fine tooth comb but cant find any clashes.

Thanks for the help anyways.

Rich

You might never win but if you give in will you ever know ??????
Mussi
23
Years of Service
User Offline
Joined: 27th Jan 2003
Location: Netherlands
Posted: 14th Nov 2003 16:16
well maybe we could take a look at it

Specs: AMD Athlon 1800, 256 DDRRam 266mhz, 80GB HD 7200rmp U133, Geforce 4 Ti4400 128mb ddr sdram
richardneail
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 16:20
Nope its top secret !! LOL

Not really helping myself here I know !!!

Rich

You might never win but if you give in will you ever know ??????
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 14th Nov 2003 16:34
Are you sure its the statements nad not the code within them that's crashing? Could you rephrase them, eg.



If that 2nd one works then maybe there's something dodgy about your variables?

"Help! My keyboard is stuckkkkkkkkkkkkkkkkkkkkkkkkkkkkk"

Mercenaries in Space demo @ http://www.davidtattersall.me.uk
richardneail
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 18:12
Hmm I will check it out but I have a number of other ifs that use the variables with no problems.

Rich

You might never win but if you give in will you ever know ??????
richardneail
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 18:44
As an interesting fact or not depending on how you look at it.

I have tried the code in DBC and it works fine with no errors !

I think I will have to email it too Lee and see what he says.


Rich

You might never win but if you give in will you ever know ??????
richardneail
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 14th Nov 2003 23:12
Ok I have found the problem it seems to be that there is a limit to the number of IF statements that can be contained within a DBP sub routine.

Thanks to everyone for your help.

Rich

You might never win but if you give in will you ever know ??????
Guyon
23
Years of Service
User Offline
Joined: 6th Jun 2003
Location: United States
Posted: 14th Nov 2003 23:41 Edited at: 14th Nov 2003 23:42
Can you tell us the limit so no one else has this problem?

Login to post a reply

Server time is: 2026-07-26 14:31:04
Your offset time is: 2026-07-26 14:31:04