Re: Why am I getting segmentation fault on this code

new topic     » goto parent     » topic index » view thread      » older message » newer message
rneu said...

In a program I find that following code produces segmentation fault on compiling, even though it works well on interpreter:

aseq = tail(tail(aseq))  

I am using above code to remove first 2 items of a sequence.

Why does this code produces segmentation fault after compiling?

Thanks for reporting a new bug. Every little bit helps.

Also, a faster way of removing the first 'n' items from a list is ...

aseq = aseq[n+1, $] 

so in your case you could write ...

aseq = aseq[3, $] 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu