Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. kamileo

    How to run the procedure given by the user?

    I would like to do the program in Prolog that allows its user to execute any procedure he wants to in that way: 1. The program reads from the keyboard the procedure that the user wants to execute (it's simple). 2. After that the Prolog sholud run that procedure. For example: user writes...
  2. kamileo

    How to get the current time in Prolog?

    % Getting current time % H - hour % M - minutes % S - seconds current_time(H,M,S) :- get_time(TS), stamp_date_time(TS,Date9,'local'), arg(4,Date9,H), arg(5,Date9,M), arg(6,Date6,S.
  3. kamileo

    How to get current time in Prolog?

    That's solved my problem! I use 'local' as the third parameter of the stamp_date_time and everything works as I wish to. Thank you for help. current_time(H,M) :- get_time(TS), stamp_date_time(TS,Date9,'local'), arg(4,Date9,H), arg(5,Date9,M).
  4. kamileo

    How to get current time in Prolog?

    Aha, that's my way in which I get current time: current_time(H,M) :- get_time(TS), stamp_date_time(TS,Date9,-7200), arg(4,Date9,H), arg(5,Date9,M).
  5. kamileo

    How to get current time in Prolog?

    Thank you, kahleen, for the answer. I've already found the solution, the same as yours, but I've another problem. I live in Poland and my applications works using my local time (UTC+2) so I set the timezone to value -7200. The problem is that we have, in Polad, the summer (UTC+2) and the winter...
  6. kamileo

    How to get current time in Prolog?

    Hello to everybody. I wonder how to get the current time from Prolog. I know how to get current date, but can't do that with the time. I want to get 3 variables (Hour, Minutes, Secs). Thanks for help.
  7. kamileo

    Prolog Quick question.

    It returns the N-element of the list.

Part and Inventory Search

Back
Top