Shakespeare's assignment variables do not work

I looked through several Shakespeare documents, but I cannot figure out how to make my Shakespeare program work.

I tried the following:

Shakespeare, A Program. Romeo, A young man. Juliet, a young woman Act I: A test of variables. Scene I: The first scene. [Enter Romeo and Juliet] Hamlet: You are as stupid as a smelly big flower! 

(This should set Juliet to 4, because smelly = * 2, big = * 2 and flower = 1)

 Juliet: Proceed to Scene II. [Exeunt] Scene I: The second scene. [Enter Romeo and Juliet] Juliet: Am I better than you? Romeo: If so, you are as intelligent as the square root of Juliet. Romeo: Open your heart. 

This should return 2, which is the value of Juliet. Unfortunately, this simply leads to a compiler error. What am I doing wrong?

+6
source share
2 answers

In the beginning you only identified Romeo and Juliet and had 2 scenes I. I think you wanted to do this

 Shakespeare, A Program. Romeo, A young man. Juliet, a young woman. Act I: A test of variables. Scene I: The first scene. [Enter Romeo and Juliet] Romeo: <<This is important, because Hamlet is not defined! You are as stupid as a smelly big flower! Juliet: Proceed to Scene II. [Exeunt] Scene II: The second scene. <<You need to change it to Scene II! [Enter Romeo and Juliet] Juliet: Am I better than you? Romeo: If so, you are as intelligent as the square root of Juliet. Romeo: Open your heart. [Exeunt] 

This should return 2.

+11
source

In addition, the compiler is not a typical practice for all characters to be executed at the end of the scene if the specified characters are returned for the next scene. In addition, β€œyou don’t need to go to scene 2 (but it’s useful). For example,

 Juliet: Proceed to Scene II Scene II: The second scene. .... 
+1
source

Source: https://habr.com/ru/post/978711/


All Articles