Op 9-8-2017 om 23:33 schreef Rik:

> I'm trying to decipher how import is treated in Matlab so support can

> eventually be added to Octave. Could someone test the following code in

> Matlab?

>

> --Code 1--

> iskeyword ('import')

> --End Code 1--

>

> I think it will return false (0).

>

> --Code 2--

> which import

> import = 5

> which import

> --End Code 2--

>

> This second test checks whether import is just a function in the namespace

> that can be overwritten by a variable.

>

> Thanks,

> Rik

>

>

Here are the results (some whitespace removed).

Your hunches seem correct.

Best, Teun

>> version

9.1.0.441655 (R2016b)

>> iskeyword('end')

ans = logical 1

>> iskeyword('import')

ans = logical 0

>> which import

built-in (C:\Program Files\MATLAB\R2016b\toolbox\matlab\general\import)

>> import=5

import = 5