Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3634044
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:43:48+00:00 2026-05-19T00:43:48+00:00

i use read_line_to_codes(Stream,Line) to read a line from a file .. first is there

  • 0

i use

read_line_to_codes(Stream,Line)

to read a line from a file .. first
is there any way to read a line and assign it to a term in prolog ?? if not i managed to read a line and put it in this char list .. now this char list contains spaces .. which is bad .. so i want to convert it to a term or a string in prolog so that i can process it easier .. spaces cannot be atoms so thats a problem ..

i appreciate the help !!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T00:43:48+00:00Added an answer on May 19, 2026 at 12:43 am

    If your input consists of Prolog terms, use read/1. You can convert character codes to an atom with atom_codes/2. A space, ‘ ‘, is also an atom, you can see that with the query: ?- atom(‘ ‘). A good way to read other input from a file with SWI-Prolog is to describe it with a DCG and then to use phrase_from_file/2 from library(pio).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a standard Linux command i can use to read a file chunk
I am trying to use Rx to read from a TCPClient receive stream and
What I need to do is use the read function from unistd.h to read
I'm attempting to use TinyXML to read and save from memory, instead of only
I am trying to read 738627 records from a flat file into MySQl. The
I use the following code (from Bluetooth Chat sample app) to read the incoming
If my file stream is in use (every time I try to debug, it
What is the difference between read() and readline() in C#? Maybe we don't use
I use read more at the end of paragraph just for reminder for user
Can anyone recommend a simple API that will allow me to use read a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.