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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:41:01+00:00 2026-05-16T01:41:01+00:00

i have define a rule with or operator but it return multiple true or

  • 0

i have define a rule with or operator but it return multiple true or false.

isloanaccept(Name,Guarantor,LoanType,LoanAmount,LoanTenure) 
:-  customer(Name,bank(_),customertype(_),
 citizen(Ci),age(Age),credit(C),
 income(I),property(_),bankemployee(_)), 
 Ci == 'malaysian',
 Age >= 18,
 C > 500, 
    I > (LoanAmount / LoanTenure) / 12,
 isguarantor(Guarantor,Name), 
 ispersonalloan(LoanType,LoanAmount,LoanTenure);
 ishouseloan(LoanType,LoanAmount,LoanTenure);
 isbusinessloan(LoanType,LoanAmount,LoanTenure);
 iscarloan(LoanType,LoanAmount,LoanTenure).

Actually, i need to check whether the loan type is fulfill the particular loan requirement and combine with general rule.

In other words, i need to define the rule above like this.

Ci == 'malaysian', Age >= 18,C > 500, 
I > (LoanAmount / LoanTenure) / 12,
isguarantor(Guarantor,Name) 
    Or with   (ispersonalloan(LoanType,LoanAmount,LoanTenure);
             ishouseloan(LoanType,LoanAmount,LoanTenure);
             isbusinessloan(LoanType,LoanAmount,LoanTenure);
             iscarloan(LoanType,LoanAmount,LoanTenur)

It should return 1 true/false rather than multiple statement in the command line.

Each of the or rule return 1 boolean value which is not i want after have checked the rule in command line. I need to have like this (General Rule & (Multiple Or Rule) ).

How to combine several or rule which return 1 boolean value ?

Please help.

Thanks.

  • 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-16T01:41:01+00:00Added an answer on May 16, 2026 at 1:41 am

    Just surround all your “or’ed” goals with once.

    e.g.

    once(
     ispersonalloan(LoanType,LoanAmount,LoanTenure);
     ishouseloan(LoanType,LoanAmount,LoanTenure);
     isbusinessloan(LoanType,LoanAmount,LoanTenure);
     iscarloan(LoanType,LoanAmount,LoanTenure)
    ).
    

    Now, the “or’ed” goals either succeed or fail.

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

Sidebar

Related Questions

i have define a recursive rule but the result seems incorrect. customer(peter,bank(maybank),customertype(personal), citizen(malaysian),age(62),credit(50000), income(3000),property(car)
I have the a rule with an action defined as follows: metric_expr : metric=NAME
I have written the following syntax rule: (define-syntax match-rewriter (syntax-rules () ((_ (patt body)
I am told I have to define an assignment operator for my Bullet class,
I have a Checkstyle validation rule configured in my project, that prohibits to define
In my .htaccess file I have defined following rule, RewriteRule t/([^.]+)/$ /videos/tag.php?tag=$1 [QSA] The
In my .htaccess file I have defined the following rule to make my register
I have the following rule defined in the .htaccess file of my webapplication's root
I have define the following SCPD document for my UPnP device: <?xml version=1.0?> <scpd
I have define variable error in struts.properties as follows: error=this is an error Now

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.