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 694707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:53:03+00:00 2026-05-14T02:53:03+00:00

I want to load this simple something into my Editor: Write:-repeat,write(hi),nl,fail. So that it

  • 0

I want to load this simple something into my Editor:

Write:-repeat,write("hi"),nl,fail.

So that it prints “hi”.

What should I do?

I’m currently trying to do File->New

and Saving a file named Write into E:\Program Files\pl\xpce\prolog\lib

When doing the query:

?-Write.

It’s printing:

1 ?- Write.
% ... 1,000,000 ............ 10,000,000 years later
% 
%       >> 42 << (last release gives the question)

Why?

  • 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-14T02:53:04+00:00Added an answer on May 14, 2026 at 2:53 am

    EDIT

    I did some more research. Apparently this is what SWI-Prolog does when you ask it about an uninstantiated variable.

    $ prolog
    Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.6.64)
    Copyright (c) 1990-2008 University of Amsterdam.
    SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to redistribute it under certain conditions.
    Please visit http://www.swi-prolog.org for details.
    
    For help, use ?- help(Topic). or ?- apropos(Word).
    
    ?- X.
    % ... 1,000,000 ............ 10,000,000 years later
    % 
    %       >> 42 << (last release gives the question)
    ?- 
    

    UPDATE

    Changing the name to lowercase works. Uppercase is for variables:

    helloworld.prolog:

    helloworld:-write('Hello World!'),nl,fail.
    

    Then:

    $ prolog
    Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.6.64)
    Copyright (c) 1990-2008 University of Amsterdam.
    SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to redistribute it under certain conditions.
    Please visit http://www.swi-prolog.org for details.
    
    For help, use ?- help(Topic). or ?- apropos(Word).
    
    ?- ['helloworld.prolog'].
    % helloworld.prolog compiled 0.00 sec, 1,376 bytes
    true.
    
    ?- helloworld.
    Hello World!
    false.
    
    ?- 
    

    Notice that you have to consult the file first. I tried this out and it works for sure.

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

Sidebar

Related Questions

I'm having difficulty doing this seemingly simple task. I want to load XML files
I want to load the data into session so that when the next button
I am trying to write a very simple script that would simulate a pocket
I want to load some helper in a model. How to do this? Tried
I would appreciate any help on this issue. Lets say I want to load
Because I want to do things like load images from the web (see this
I want to load one or more DLLs dynamically so that they run with
I want to load some images into my application from the file system. There's
I'm just starting with jQuery, and having trouble doing something embarrassingly simple: using .load()
I have a heavily nested XML document that I need to load into my

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.