[Gambas-user] Quickie on SELECT
Fabien Bodard
gambas.fr at ...626...
Sun Feb 8 14:47:08 CET 2015
Le 8 févr. 2015 03:43, "Dimitris Anogiatis" <dosida at ...626...> a écrit :
>
> Hey Bruce,
>
> You could try
>
> SELECT CASE EVAL(hSomething.SomeArray.Exists(hSomething.Value))
> CASE True
> Print "Yes, value exists in hSomething"
> CASE False
> Print "No, value does not exist in hSomething"
> CASE Else
> END SELECT
>
????+
For a Boolean condition there is IF THEN ELSE
Select case CASES are hardcoded.
But you can construct something with an ELSE IF tree
> Putting CASE EVAL (if it's possible) to make SELECT check against the
> results of the Eval Statements, would mean (as I understand it) that the
> result of EVAL would need to be within a reasonable range so that it
> doesn't raise any exceptions, and the same data type as the hSomething
that
> you have in your original example.
>
> I hope this helps.
>
> Regards,
> Dimitris
>
> On Sat, Feb 7, 2015 at 5:26 PM, adamnt42 at ...626... <adamnt42 at ...626...>
> wrote:
>
> >
> > Does anyone know if you can use an EVAL in a CASE selector?
> > e.g. SELECT hSomething
> > ...
> > CASE EVAL(hSomething.SomeArray.Exisits(hSomething.Value))
> > ...
> >
> > (I am just being too lazy to try it)
> >
> > regards
> > Bruce
> > --
> > B Bruen <adamnt42 at ...3379... (sort of)>
> >
> >
> >
------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming. The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> > your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more.
Take a
> > look and join the conversation now. http://goparallel.sourceforge.net/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> >
>
------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list