<div dir="ltr">Public Sub Main()<br><br> Dim i As Integer<br><br> Try i = "Mickey Mouse"<br> Try i = "Pluto"<br> Try i = "1"<br> Print i<br><br><div>End</div><div><br></div><div>Regards</div><div>Gianluigi<br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2018-06-19 23:37 GMT+02:00 Mayost Sharon <span dir="ltr"><<a href="mailto:sharon@455.co.il" target="_blank">sharon@455.co.il</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Sorry<br>
I meant in Visual Basic<br>
To skip to the next line<br>
There is the command<br>
<br>
On Error Resume Next<br>
<br>
In GAMBAS there is no possibility<br>
<br>
<br>
---------- Original Message -----------<br>
From: Gianluigi <<a href="mailto:bagonergi@gmail.com">bagonergi@gmail.com</a>><br>
To: Gambas Mailing List <<a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a>><br>
Sent: Tue, 19 Jun 2018 23:05:47 +0200<br>
Subject: Re: [Gambas-user] try if error<br>
<br>
> For those who want to know what 'Goto 0' means in Vb:<br>
> <a href="https://stackoverflow.com/questions/9983464/why-would-you-ever-use-on-error-" rel="noreferrer" target="_blank">https://stackoverflow.com/<wbr>questions/9983464/why-would-<wbr>you-ever-use-on-error-</a><br>
> goto-0<br>
> <br>
> Regards<br>
> Gianluigi<br>
> <br>
> 2018-06-19 22:54 GMT+02:00 Mayost Sharon <<a href="mailto:sharon@455.co.il">sharon@455.co.il</a>>:<br>
> <br>
> > OK<br>
> ><br>
> > Many thanks<br>
> ><br>
> > ---------- Original Message -----------<br>
> > From: Jussi Lahtinen <<a href="mailto:jussi.lahtinen@gmail.com">jussi.lahtinen@gmail.com</a>><br>
> > To: Gambas Mailing List <<a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a>><br>
> > Sent: Tue, 19 Jun 2018 23:49:33 +0300<br>
> > Subject: Re: [Gambas-user] try if error<br>
> ><br>
> > > Dim hDate As Date<br>
> > ><br>
> > > Try hDate =Date(2018, 13, 1)<br>
> > ><br>
> > > If Error Then<br>
> > > Print "Date Error"<br>
> > > Endif<br>
> > ><br>
> > > If hDate = something Then<br>
> > ><br>
> > > ...<br>
> > ><br>
> > > Jussi<br>
> > ><br>
> > > On Tue, Jun 19, 2018 at 11:46 PM, Mayost Sharon <<a href="mailto:sharon@455.co.il">sharon@455.co.il</a>><br>
> > wrote:<br>
> > ><br>
> > > > This is not a good option<br>
> > > > Because it will send a print every time<br>
> > > > If the date is correct<br>
> > > ><br>
> > > > ---------- Original Message -----------<br>
> > > > From: Yahoo via User <<a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a>><br>
> > > > To: Gambas Mailing List <<a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a>>, Jussi Lahtinen<br>
> > > > <<a href="mailto:jussi.lahtinen@gmail.com">jussi.lahtinen@gmail.com</a>><br>
> > > > Cc: Yahoo <<a href="mailto:olivier.cruilles@yahoo.fr">olivier.cruilles@yahoo.fr</a>><br>
> > > > Sent: Tue, 19 Jun 2018 16:35:33 -0400<br>
> > > > Subject: Re: [Gambas-user] try if error<br>
> > > ><br>
> > > > > Better this form:<br>
> > > > ><br>
> > > > > Try Print Date(2018, 13, 1)<br>
> > > > > IF Error Then<br>
> > > > > Print "Wrong Date format"<br>
> > > > > else<br>
> > > > > ‘ Do something whit your date….<br>
> > > > > End If<br>
> > > > ><br>
> > > > > Cordialement,<br>
> > > > > —<br>
> > > > > Olivier Cruilles<br>
> > > > > Email: <a href="mailto:olivier.cruilles@yahoo.fr">olivier.cruilles@yahoo.fr</a><br>
> > > > ><br>
> > > > > Le June 19, 2018 à 16:30:03, Jussi Lahtinen (<br>
> > <a href="mailto:jussi.lahtinen@gmail.com">jussi.lahtinen@gmail.com</a>)<br>
> > > > a écrit:<br>
> > > > ><br>
> > > > > Oh, maybe you want to use Catch structure...<br>
> > > > > <a href="http://gambaswiki.org/wiki/lang/catch" rel="noreferrer" target="_blank">http://gambaswiki.org/wiki/<wbr>lang/catch</a><br>
> > > > ><br>
> > > > > Jussi<br>
> > > > ><br>
> > > > > On Tue, Jun 19, 2018 at 11:27 PM, Jussi Lahtinen <<br>
> > > > <a href="mailto:jussi.lahtinen@gmail.com">jussi.lahtinen@gmail.com</a>> wrote:<br>
> > > > > I don't understand the problem.<br>
> > > > ><br>
> > > > > If Error Then Goto ErrorHandling<br>
> > > > ><br>
> > > > > ...<br>
> > > > ><br>
> > > > > ErrorHandling:<br>
> > > > > Print "Here is my error handling"<br>
> > > > ><br>
> > > > > Jussi<br>
> > > > ><br>
> > > > > On Tue, Jun 19, 2018 at 11:22 PM, Mayost Sharon <<a href="mailto:sharon@455.co.il">sharon@455.co.il</a>><br>
> > > > wrote:<br>
> > > > > In Visual Basic<br>
> > > > > there is<br>
> > > > > on error goto 0<br>
> > > > ><br>
> > > > > ---------- Original Message -----------<br>
> > > > > From: PICCORO McKAY Lenz <<a href="mailto:mckaygerhard@gmail.com">mckaygerhard@gmail.com</a>><br>
> > > > > To: Gambas Mailing List <<a href="mailto:user@lists.gambas-basic.org">user@lists.gambas-basic.org</a>><br>
> > > > > Sent: Tue, 19 Jun 2018 16:18:06 -0400<br>
> > > > > Subject: Re: [Gambas-user] try if error<br>
> > > > ><br>
> > > > > > 2018-06-19 16:06 GMT-04:00 Mayost Sharon <<a href="mailto:sharon@455.co.il">sharon@455.co.il</a>>:<br>
> > > > > ><br>
> > > > > > > Hello<br>
> > > > > > ><br>
> > > > > > > How do I proceed to the next line<br>
> > > > > > > If there is an error<br>
> > > > > > ><br>
> > > > > > for cases when it's error format or error of invalid date just:<br>
> > > > > ><br>
> > > > > > If Date(2018, 13, 1) Then<br>
> > > > > ><br>
> > > > > > for others error might be a good question unless compared using<br>
> > Comp()<br>
> > > > as<br>
> > > > > > strings!<br>
> > > > > ><br>
> > > > > > i dont know what other type of errors can be produced here!<br>
> > > > > ><br>
> > > > > > ><br>
> > > > > > > For example, if the date is not correct<br>
> > > > > > ><br>
> > > > > > > ' Gambas module file<br>
> > > > > > ><br>
> > > > > > > Public Sub Main()<br>
> > > > > > ><br>
> > > > > > > Try Print Date(2018, 13, 1)<br>
> > > > > > ><br>
> > > > > > > If Date(2018, 13, 1) Then<br>
> > > > > > ><br>
> > > > > > > Endif<br>
> > > > > > ><br>
> > > > > > > End<br>
> > > > > > ><br>
> > > > > > > Thank you<br>
> > > > > > ><br>
> > > > > > > ----[ Gambas mailing-list is hosted by<br>
> > <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a><br>
> > > > ]----<br>
> > > > > > ><br>
> > > > > ------- End of Original Message -------<br>
> > > > ><br>
> > > > > ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a><br>
> > ]----<br>
> > > > ><br>
> > > > > ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a><br>
> > ]----<br>
> > > > ------- End of Original Message -------<br>
> > > ><br>
> > > ><br>
> > > > ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a><br>
> > ]----<br>
> > > ><br>
> > ------- End of Original Message -------<br>
> ><br>
> ><br>
> > ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
> ><br>
------- End of Original Message -------<br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div><br></div>