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

I use the following code (from Bluetooth Chat sample app) to read the incoming
For my homework project, I had to read in a book and then parse
Wondering why php keeps telling me a file doesnt exist when it does. this
I have a concatenated file made up of some number of bzip2 archives. I
I am trying to implement an ihttphandeler for streaming files. files may be tiny
I have programmed a proxy.php script (listed below), which would fetch an image specified
I am working through problems in Accelerated C++ We have a program which stores
Having problems compiling this class. I'm working through a book on java and this
I am hoping this is a simple stupid noob mistake that can be fixed
I have this code in Java: InputStreamReader isr = new InputStreamReader(getInputStream()); BufferedReader ir =

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.