Jump to content

How to write so the script can recognize an imaginary number?


Ultima2
 Share

Recommended Posts

  • Moderators

How do I write a script that can recognize imaginary numbers like (-4)^(1/2) and like maybe even write the number as 2i?

Think of a plan.

Open SciTe

Start Typing

Hit a problem

Post to the forum

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hi I've been trying to get my script to recognize imaginary numbers for the past two hours. I don't know how to start, can anyone show me what's one way to teach the script to recognize imaginary numbers?

; How to write so the script can recognize an imaginary number?

Local $aNum[5] = [3, "3i", 2]

For $x = 0 To 2
    If StringInStr($aNum[$x], "i") Then MsgBox(0, "", $aNum[$x] & @CRLF & "Look! There's one")
Next
Link to comment
Share on other sites

  • Moderators

<2 posts merged>

Do not create multiple topics on the same subject matter, or you'll lose posting privileges all together.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...