Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Error Label


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2007, 05:50 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,314
Default Error Label

Hi...Again....

Ok my endless loop is sorted out thanks to Dzt input and thoughts....but i have another problem...

How do i exit the sub before the errorlabel?

Maybe it will be cleared with some code...

Code:
Sub Dummy
Errorlabel(error)
oranges=3
if oranges 0 2then aples =5
'How to exit the sub HERE? If no error is detected the code below is executed anyway!
error:
Bananas=10
End Sub
Thanks
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #2 (permalink)  
Old 06-28-2007, 05:54 PM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Goto
code...
label:

.. and Return

See b4ppc help
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #3 (permalink)  
Old 06-28-2007, 05:57 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,314
Default

Yes i saw that but my problem is that this particular sub is the app_close...wont this cause another endless loop?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #4 (permalink)  
Old 06-28-2007, 05:58 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 636
Default

The elegant way...

Code:
Sub Dummy
    Errorlabel(error)
    oranges=3
    if oranges 0 2then aples =5
    'How to exit the sub HERE? If no error is detected the code below is executed anyway!
    Return
    error:
        Bananas=10
End Sub

specci48



I haven't seen the Return by dzt ... sorry!
Reply With Quote
  #5 (permalink)  
Old 06-28-2007, 06:04 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 636
Default

Additional question:

Why are you afraid of a loop? After the sub is finished, AppClose is not executed again.


specci48
Reply With Quote
  #6 (permalink)  
Old 06-28-2007, 06:07 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,314
Default

Ok

I tryed RETURN and it worked fine....

I was afraid that returning to thesub that called it, being it the same sub it was on, would cause an endless loop...

I was wrong...

An Yes, I do

__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

vB 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
Label or no label kavka Questions & Help Needed 1 03-18-2008 07:06 AM
Label Ausrichtung formatieren MiRu German Forum 6 02-25-2008 02:42 PM
transparent background,label cdeane Questions & Help Needed 4 09-20-2007 06:45 AM
Label with transparent background BerndB Basic4ppc Wishlist 6 07-03-2007 04:00 PM
error label and for next loop Cableguy Questions & Help Needed 4 05-23-2007 08:47 AM


All times are GMT. The time now is 12:50 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0