PhreeqcUsers Discussion Forum
Click here to donate to keep PhreeqcUsers open

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Quotation marks issue - causing ERROR
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: Quotation marks issue - causing ERROR  (Read 681 times)

Charlie

  • Admin
  • Posts: 159
Quotation marks issue - causing ERROR
« on: May 27, 2019, 10:10:37 AM »
I have been using PHREEQC on my mac and I kept getting errors relating to this section of the input.

USER_PUNCH
-headings Zn(mg/l) Pb(mg/l)
-start
10 Zn_sol = (mol(“Zn+2”)*65.38*1000)
20 Pb_sol = (mol(“Pb+2”)*207.2*1000)
30 PUNCH Zn_sol Pb_sol
40 PUNCH DESCRIPTION
-end

All seemed ok, but it stopped running with this message:

ERROR: Syntax_error : missing " or ( in line:

ERROR:  in BASIC line
 10  Zn_sol = (mol(”Zn+2”)*65.38*1000)

ERROR: Fatal Basic error in USER_PUNCH.
Stopping.


After a LOT of confusion I looked at the output file and noticed that it read:


ERROR: Syntax_error : missing " or ( in line:
ERROR:  in BASIC line
 10  Zn_sol = (mol(‚ÄùZn+2‚Äù)*65.38*1000)
ERROR: Fatal Basic error in USER_PUNCH.
Stopping.

I realised that the character type on my Mac keyboard wasn't being parsed by PHREEQC correctly.
I solved the issue easily by copying and pasting the " from an example from the PHREEQC website. A small but important technical detail!  Hope this helps.

USER_PUNCH
-headings Zn(mg/l) Pb(mg/l)
-start
10 Zn_sol = (mol("Zn+2")*65.38*1000)
20 Pb_sol = (mol("Pb+2")*207.2*1000)
30 PUNCH Zn_sol Pb_sol
40 PUNCH DESCRIPTION
-end   
Logged

dlparkhurst

  • Top Contributor
  • Posts: 2738
Re: Quotation marks issue - causing ERROR
« Reply #1 on: May 27, 2019, 07:53:10 PM »
You also could use single quotes, for example mol('Zn+2').
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Beginners »
  • PHREEQC basics »
  • Quotation marks issue - causing ERROR
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2