octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: conversion of octave_int<short int> to int? moved from help-octave


From: Eric Chassande-Mottin
Subject: Re: conversion of octave_int<short int> to int? moved from help-octave
Date: Tue, 13 Nov 2007 04:54:00 -0500

thanks for your note,

> In any case, I think having functions for this is better than using
> conversion operators because the functions can't be invoked
> automatically, so you are forced to think about the type conversions
> that you are making.
>
> If you'd like to discuss how this should be implemented, please start
> a discussion on the maintainers list.

my programming skills in C++ are limited and I don't have a strong preference.
just the feeling that although functions make sense when dealing with
containers like vectors or matrices, they might be a syntax overkill
for scalars.
the simple expression above would become

int arcIndex = arcs(k).int_value()  - 1;

more complicated expressions are likely to be difficult to read.

e.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]