SWI-Prolog newbie instantiation?
From: Pnewbie (ggroups2_at_yahoo.com)
Date: 08/08/04
- Next message: Bart Demoen: "Re: efficiency testing"
- Previous message: Algernon: "Re: efficiency testing"
- Next in thread: Nick Wedd: "Re: SWI-Prolog newbie instantiation?"
- Reply: Nick Wedd: "Re: SWI-Prolog newbie instantiation?"
- Reply: Bart Demoen: "Re: SWI-Prolog newbie instantiation?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 7 Aug 2004 22:21:44 -0700
Ok, Can someone tell me what how this works?
extractor(String, Result) :- append(Pre, Post, String), append(" ",
Middle, Post), Result is Middle.
When String is something like "this is a", what are the values of all
those variables. (I cant get it to display the variables at run time,
I will just get [23, 24, 68] or something like that.) Also is it
possible to modify this so that you can extract between two different
characters? I think I need to add two more appends right?
I find the tracer pretty useless, it never gives me the strings but
stuff like
Exit: (8) lists:append([], [62, 48, 44, 49], [62, 48, 44, 49]) ?
creep
Call: (8) lists:append([32], _L219, [62, 48, 44, 49]) ? creep
Fail: (8) lists:append([32], _L219, [62, 48, 44, 49]) ? creep
- Next message: Bart Demoen: "Re: efficiency testing"
- Previous message: Algernon: "Re: efficiency testing"
- Next in thread: Nick Wedd: "Re: SWI-Prolog newbie instantiation?"
- Reply: Nick Wedd: "Re: SWI-Prolog newbie instantiation?"
- Reply: Bart Demoen: "Re: SWI-Prolog newbie instantiation?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|