Anthrazit

885 Reputation

13 Badges

5 years, 317 days

MaplePrimes Activity


These are questions asked by Anthrazit

I've experienced problems a couple of times when trying to save a workbook in Maple 2021.

At first I thought it was due to a unstable VPN connection, but this also happens on a local drive.

Here's another basic question in programming, sorry about that.

This little program does a loop over a table which was just created, and thus empty. As far as I can see the for - do loop goes through the loop at least once.

Is there a way to change the program, so that it doesn't go through the contents of the loop at all?


 

i := table()

table( [ ] )

(1)

NULL

a := 0;

0

1

1

numelems(i)

0

(2)

NULL


 

Download table_and_loop.mw

Any idea how I can get the number of elements in an exprseq after a SearchAll command?

numelems apparently is not the right function.


 

with(StringTools)

a := "tre - tre - tre"

"tre - tre - tre"

(1)

b := SearchAll("-", a)

5, 11

(2)

whattype(b)

exprseq

(3)

numelems(b)

Error, invalid input: numelems expects 1 argument, but received 2

 

``


 

Download numelems.mw

Here's another possible bug related to special characters (like ø, æ, å).

SubString considers each of the characters to be consisting of 2 different other ones.

Related to https://www.mapleprimes.com/questions/231765-Special-Characters-In-Maple-Workbook-Code.

with(StringTools)

a := "Øyeblikk"

"Øyeblikk"

(1)

SubString(a, 2 .. ())

"�yeblikk"

(2)

SubString(a, 1 .. ())

"Øyeblikk"

(3)

SubString(a, 3 .. ())

"yeblikk"

(4)

``

Download SubString.mw

Special characters like æ,ø,å are causing some troubles when used in Maple Code attachments in workbooks.

I've managed to get around the problem by using HTML equivalents in the first run, but then this will cause problems when exporting the same strings to Excel.

Funnily this problem just arises in Workbooks, not when using the same code in a code edit region.

Special.zip

First 13 14 15 16 17 18 19 Last Page 15 of 26