Else If is not working on algorithm in algpseudocode Announcing the arrival of Valued...

Relating to the President and obstruction, were Mueller's conclusions preordained?

What is the difference between a "ranged attack" and a "ranged weapon attack"?

The test team as an enemy of development? And how can this be avoided?

White walkers, cemeteries and wights

Asymptotics question

Tips to organize LaTeX presentations for a semester

Delete free apps from Play Store library

Why is std::move not [[nodiscard]] in C++20?

Can I cast X spells with Bolas's Citadel?

How do living politicians protect their readily obtainable signatures from misuse?

How much damage would a cupful of neutron star matter do to the Earth?

What order were files/directories output in dir?

Is it possible for SQL statements to execute concurrently within a single session in SQL Server?

Why is it faster to reheat something than it is to cook it?

Project Euler #1 in C++

Did any compiler fully use 80-bit floating point?

Nose gear failure in single prop aircraft: belly landing or nose-gear up landing?

How to ask rejected full-time candidates to apply to teach individual courses?

Did pre-Columbian Americans know the spherical shape of the Earth?

How to write capital alpha?

Co-worker has annoying ringtone

Weaponising the Grasp-at-a-Distance spell

How to change the tick of the color bar legend to black

Can an iPhone 7 be made to function as a NFC Tag?



Else If is not working on algorithm in algpseudocode



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)How to change Algorithm title to something else?Algorithm indent problem with sig-alternate document & algorithm(ic) packageInserting multiple columns in algorithmStart algorithm step numbering not at 1if-else inside for loop in algorithm packageInput and output in latex algorithmThere is always a zero at the end of my algorithmwriting a data structure in an algorithmAlgorithm returning 0The algorithm does not execute in IEEE transaction template. Please help












0















I tried to add Else in my pseudocode but it is not showing and I am getting 'Missing number, treated as zero'. This is my code and the current outcome.



usepackage{algorithm}
usepackage[noend]{algpseudocode}

begin{algorithm}
caption{Homomorphism: Query Containment}label{alg:euclid}
begin{algorithmic}[1]
Function{getHomorphism}{XPath $p_3$, XPath $q_3$}
ForAll {nodes.getLength}
State ($q_3(root)$ == $p_3(root)$) $leftarrow$ textbf{true}
State textbf{return} true
If{true}
ForAll {descendantNodes.getLength}
State textbf{return} true
If {true}
ForAll {childNodes.getLength}
State textbf{return} true
If {true}
ForAll {wildcardNodes.getLength}
State textbf{return} true
Else
State textbf{return} false
EndIf
EndFunction
end{algorithmic}
end{algorithm}


enter image description here










share|improve this question









New contributor




user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I tried to add Else in my pseudocode but it is not showing and I am getting 'Missing number, treated as zero'. This is my code and the current outcome.



    usepackage{algorithm}
    usepackage[noend]{algpseudocode}

    begin{algorithm}
    caption{Homomorphism: Query Containment}label{alg:euclid}
    begin{algorithmic}[1]
    Function{getHomorphism}{XPath $p_3$, XPath $q_3$}
    ForAll {nodes.getLength}
    State ($q_3(root)$ == $p_3(root)$) $leftarrow$ textbf{true}
    State textbf{return} true
    If{true}
    ForAll {descendantNodes.getLength}
    State textbf{return} true
    If {true}
    ForAll {childNodes.getLength}
    State textbf{return} true
    If {true}
    ForAll {wildcardNodes.getLength}
    State textbf{return} true
    Else
    State textbf{return} false
    EndIf
    EndFunction
    end{algorithmic}
    end{algorithm}


    enter image description here










    share|improve this question









    New contributor




    user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I tried to add Else in my pseudocode but it is not showing and I am getting 'Missing number, treated as zero'. This is my code and the current outcome.



      usepackage{algorithm}
      usepackage[noend]{algpseudocode}

      begin{algorithm}
      caption{Homomorphism: Query Containment}label{alg:euclid}
      begin{algorithmic}[1]
      Function{getHomorphism}{XPath $p_3$, XPath $q_3$}
      ForAll {nodes.getLength}
      State ($q_3(root)$ == $p_3(root)$) $leftarrow$ textbf{true}
      State textbf{return} true
      If{true}
      ForAll {descendantNodes.getLength}
      State textbf{return} true
      If {true}
      ForAll {childNodes.getLength}
      State textbf{return} true
      If {true}
      ForAll {wildcardNodes.getLength}
      State textbf{return} true
      Else
      State textbf{return} false
      EndIf
      EndFunction
      end{algorithmic}
      end{algorithm}


      enter image description here










      share|improve this question









      New contributor




      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I tried to add Else in my pseudocode but it is not showing and I am getting 'Missing number, treated as zero'. This is my code and the current outcome.



      usepackage{algorithm}
      usepackage[noend]{algpseudocode}

      begin{algorithm}
      caption{Homomorphism: Query Containment}label{alg:euclid}
      begin{algorithmic}[1]
      Function{getHomorphism}{XPath $p_3$, XPath $q_3$}
      ForAll {nodes.getLength}
      State ($q_3(root)$ == $p_3(root)$) $leftarrow$ textbf{true}
      State textbf{return} true
      If{true}
      ForAll {descendantNodes.getLength}
      State textbf{return} true
      If {true}
      ForAll {childNodes.getLength}
      State textbf{return} true
      If {true}
      ForAll {wildcardNodes.getLength}
      State textbf{return} true
      Else
      State textbf{return} false
      EndIf
      EndFunction
      end{algorithmic}
      end{algorithm}


      enter image description here







      algorithms algorithmic algpseudocode






      share|improve this question









      New contributor




      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 4 mins ago







      user6185827













      New contributor




      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 10 mins ago









      user6185827user6185827

      11




      11




      New contributor




      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user6185827 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          user6185827 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f485868%2felse-if-is-not-working-on-algorithm-in-algpseudocode%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          user6185827 is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          user6185827 is a new contributor. Be nice, and check out our Code of Conduct.













          user6185827 is a new contributor. Be nice, and check out our Code of Conduct.












          user6185827 is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f485868%2felse-if-is-not-working-on-algorithm-in-algpseudocode%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Can't compile dgruyter and caption packagesLaTeX templates/packages for writing a patent specificationLatex...

          Schneeberg (Smreczany) Bibliografia | Menu...

          IEEEtran - How to include ORCID in TeX/PDF with PdfLatexIs there a standard way to include ORCID in TeX /...