MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Compile with ReplaceList


Following a question posted by Joerg Schaber (schaber at molgen.mpg.de) and 
some private discussion I found that the following code generates an 
unexpected error message (I'm using version 5.0.0)
myFunc = Compile[{{list1, _Real, 1}, {newList, _Real, 1}, {pos, 
_Integer, 1}, {newPos, _Integer, 1}},
    ReplacePart[list1, newList, pos, newPos]]

and the error message is

ReplacePart::argx : ReplacePart called with 4 arguments; 3 arguments are 
expected.

I wonder if the this code generates an error message in version 5.1. If 
it is It should be posted to WRI as a bug report.

Regards
yehuda


  • Prev by Date: Re: use of orderless
  • Next by Date: Re: Table Iterators
  • Previous by thread: Installing 5.1 without 5.0?
  • Next by thread: Maximizing a function that depends on a list of length M grows as 3^M