Discussions related to Visual Prolog
billgates198606

length : (Elem* List) how to use the Elem

Unread post by billgates198606 »

list::length/1->
length : (Elem* List)
-> positive Length.

Returns the length of the list List.


when i input list::length(string* ,List), it's wrong ,how to use it ,
User avatar
Tonton Luc
VIP Member
Posts: 204
Joined: 16 Oct 2001 23:01

Unread post by Tonton Luc »

Hi,

One sample :

Code: Select all

My_list = ["a","b","c"], Nb = list::length(My_list), stdio::writef("My_list contain % element(s).",Nb).
:wink:
User avatar
George
Active Member
Posts: 47
Joined: 19 Sep 2011 8:54

Unread post by George »

Read the following post to know more about List,

http://wiki.visual-prolog.com/index.php ... _Recursion
Kind Regards,
George Ananth. S | Prolog Developer
georgeananth.prolog@gmail.com
+91 9791499282
Post Reply