ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

const declarations needs a const keyword on every line #432

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The following will not work (with code just retrievde from repository) :
const
  otInteger     = 3;
  otFloat       = 4;
  otString      = 5;

This will work:
const
  otInteger     = 3;
const
  otFloat       = 4;
const
  otString      = 5;

I think the same is true for the var keyword.

Original issue reported on code.google.com by sindre...@gmail.com on 28 Aug 2013 at 1:01

GoogleCodeExporter commented 8 years ago
If you are in script or consolidated mode, this is normal (and also true for 
"type").

See https://code.google.com/p/dwscript/wiki/SourceStructure

If you want const/var/type blocks, you have to either declare a program or be 
in a classic unit (ie. with an interface/implementation)

Original comment by zar...@gmail.com on 28 Aug 2013 at 1:10