d2c string-to-integer problem 
Author Message
 d2c string-to-integer problem

I'm trying to compile a simple program that reads in a number. The
problem is, when I try to convert the string to a number, I get this
error. Can anyone help?


Expected an instance of {the class <function>}, but got 1
zsh: abort      ./string-test

Here's my code, stripped down to just the part that causes the error:

module: string-test
synopsis:
author:
copyright:

define function main(name, arguments)
  let num = string-to-integer("4");
  exit-application(0);
end function main;

// Invoke our main() function.
main(application-name(), application-arguments());

--
Brian Campbell
Real email: lambda (at) theworld (dot) com



Sat, 05 Jun 2004 16:00:50 GMT  
 d2c string-to-integer problem

Quote:

> I'm trying to compile a simple program that reads in a number. The
> problem is, when I try to convert the string to a number, I get this
> error. Can anyone help?


> Expected an instance of {the class <function>}, but got 1
> zsh: abort      ./string-test

> Here's my code, stripped down to just the part that causes the error:

> module: string-test
> synopsis:
> author:
> copyright:

> define function main(name, arguments)
>   let num = string-to-integer("4");
>   exit-application(0);
> end function main;

> // Invoke our main() function.
> main(application-name(), application-arguments());

That works fine here.

d2c 2.3.6pre3 (build from cvs a few days ago) on SuSE 7.1 x86 Linux.

-- Bruce



Sat, 05 Jun 2004 17:10:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. d2c string-to-integer error

2. Interesting problem comparing strings with integer values...

3. convert integer string to date string

4. Problem with top level definitions in d2c

5. Help required translating strings to integer arrays

6. Converting a number in a String character to an Integer

7. Integer to Binary String

8. String to Integer

9. Code Snippet: Integer to String Converter

10. Convert 2D-Integer-Array to String

11. How do I convert integer to string array?

12. Integer and a string arrays to LabVIEW from Matlab script node

 

 
Powered by phpBB® Forum Software