Discussions related to Visual Prolog
-
daveplummermd
- VIP Member
- Posts: 84
- Joined: 18 Jul 2006 17:18
Post
by daveplummermd »
I remember seeing somewhere an abbreviated method to construct a list of sequential integers.
I am looking for:
to be achieved with a shortcut looking something like this
But, I can not remember or find the proper syntax for that abbreviated method.
Dave Plummer
-
Thomas Linder Puls
- VIP Member
- Posts: 1465
- Joined: 28 Feb 2000 0:01
Post
by Thomas Linder Puls »
We do not have such a syntax. But you can use a list comprehension like this:
Code: Select all
List = [ I || I = std::fromTo(1, 5) ]
Regards Thomas Linder Puls
PDC
-
daveplummermd
- VIP Member
- Posts: 84
- Joined: 18 Jul 2006 17:18
Post
by daveplummermd »
Thank you!
Dave Plummer