开发者

Looking for examples of the record library for SWI-prolog [closed]

开发者 https://www.devze.com 2023-03-08 10:34 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years开发者_运维知识库 ago.

Improve this question

I am looking for example uses (or tutorials) of the record library

http://www.cs.fit.edu/~pkc/classes/ai/swi-prolog/Manual/record.html

for SWI-prolog that I can use as a template. Do you have any pointers?

Thanks,

SetJmp


There is one example of usage here in the SWI-Prolog JSON library to hold JSON options http://www.swi-prolog.org/git/packages/http.git/blob/HEAD:/json.pl

It is pretty straightforward to use. the only pain is that you can't pull arbitrary fields off a record because they need to be accessed by _(X). Also, i do not believe any extra meta-data about the record is stored in case you want to get the field names at run time.

0

精彩评论

暂无评论...
验证码 换一张
取 消