login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Example of wrong indentation.

On August 19, 2006 12:47 PM Vanuxem Grégory wrote:

  Is this bug reproducible ?

  If someone can try to compile, in a fresh new axiom session,
  the attached file. I get a segmentation fault [when compiling
  the code using SPAD]

The aldor compiler gives a more reasonable result.

aldor
#include "axiom"
#pile
MyIndexedOneDimensionalArray(S:Type, mn:Integer):_
                 Exports == Implementation where
   Qsetelt ==> SETELT$Lisp
   Qnew ==> GETREFV$Lisp
Exports == OneDimensionalArrayAggregate S with
myProperty
Implementation == add
minIndex x == mn
aldor
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/2129260382931220326-25px001.as using 
      AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
"/var/zope2/var/LatexWiki/2129260382931220326-25px001.as", line 8: 
  Exports == OneDimensionalArrayAggregate S with
..^
[L8 C3] #1 (Error) Syntax error.
The )library system command was not called after compilation.

Correct indentation

aldor
#include "axiom"
#pile
MyIndexedOneDimensionalArray(S:Type, mn:Integer):_
Exports == Implementation where
    Qsetelt ==> SETELT$Lisp
    Qnew ==> GETREFV$Lisp
Exports == OneDimensionalArrayAggregate S with
myProperty
Implementation == add
minIndex(x:%):Integer == mn
aldor
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/7122011750684548101-25px002.as using 
      AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
"/var/zope2/var/LatexWiki/7122011750684548101-25px002.as", line 4: 
Exports == Implementation where
^..........^
[L4 C1] #1 (Error) No meaning for identifier `Exports'.
[L4 C12] #5 (Error) There are 0 meanings for `Implementation' in this context.
The possible types were:
          Implementation: ? ==  add ()
                , a local
  The context requires an expression of type Exports.
"/var/zope2/var/LatexWiki/7122011750684548101-25px002.as", line 10: myProperty ........^ [L10 C9] #4 (Error) No meaning for identifier `myProperty'.
The )library system command was not called after compilation.




  Subject:   Be Bold !!
  ( 13 subscribers )  
Please rate this page: