Don't understand this error

2 messages Options
Embed this post
Permalink
Chris Saunders-4

Don't understand this error

Reply Threaded More More options
Print post
Permalink
Here is a function from my code:

 to_octal_string: STRING
   -- Convert to a octal string.
  local
   str: C_STRING
  do
   create str.make_by_pointer ({MPZ_FUNCTIONS}.mpz_get_str (default_pointer,
{BASE_CONSTANTS}.Octal, item))
   Result := str.string
  end

I get the error:

 2 VJAR: Source of assignment is not compatible with target.
MPZ.to_octal_string (mpir_x64) 342, 4

I cannot see why the result is not compatible to the target as `string' from
C_STRING is declared as "string: STRING".

Regards
Chris Saunders

Chris Saunders-4

Re: Don't understand this error

Reply Threaded More More options
Print post
Permalink
Sorry, I answered my own question.  I forgot to use the base-safe library.

Regards
Chris Saunders

  ----- Original Message -----
  From: Chris Saunders
  To: Eiffel Software Mailing List
  Sent: Friday, September 18, 2009 6:16 PM
  Subject: [eiffel_software] Don't understand this error


    Here is a function from my code:

  to_octal_string: STRING
  -- Convert to a octal string.
  local
  str: C_STRING
  do
  create str.make_by_pointer ({MPZ_FUNCTIONS}.mpz_get_str (default_pointer,
  {BASE_CONSTANTS}.Octal, item))
  Result := str.string
  end

  I get the error:

  2 VJAR: Source of assignment is not compatible with target.
  MPZ.to_octal_string (mpir_x64) 342, 4

  I cannot see why the result is not compatible to the target as `string' from
  C_STRING is declared as "string: STRING".

  Regards
  Chris Saunders



 

[Non-text portions of this message have been removed]