Logo 
Search:

Artificial Intelligence Articles

Submit Article
Home » Articles » Artificial Intelligence » ProLogRSS Feeds

Prolog program of string token

Posted By: Milind Mishra     Category: Artificial Intelligence     Views: 2837

Prolog program of string token.

Code for Prolog program of string token in Artificial Intelligence

domains
    strlist = string*
predicates
    start
    createlist(string,strlist,strlist)
clauses
    start:-
        createlist("This is testing",[],List).        

    createlist(Line,Old_list,New_list):-
        Line <> "",
        fronttoken(Line,Token,Rest),
        New_list = [Token | Old_list],
        createlist(Rest,New_list,Blank_list).

    createlist(_,List,[]):-
        write(List).
  
Share: 


Didn't find what you were looking for? Find more on Prolog program of string token Or get search suggestion and latest updates.

Milind Mishra
Milind Mishra author of Prolog program of string token is from India.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!