[OpenSCAD] "lookup" with strings? a bug?

Jordan Brown openscad at jordan.maileater.net
Wed May 29 16:43:25 EDT 2019


On 5/29/2019 1:39 PM, Serge wrote:
> wait whaaaat?? I'm using search("top", … searching for "top" why it
> returns me "type"? who wrote this rap?

See the documentation and my note about how if you're searching for a
string you need to make it be an array containing only that string. 
When you just say "top" it's interpreted as "search for t, o, or p".

> On 5/29/19, nop head <nop.head at gmail.com> wrote:
>> Lookup is for numerical interpolation. You need search for strings,
>> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Other_Language_Features#Search
>>
>> On Wed, 29 May 2019 at 17:34, Serge <moneyforidea at gmail.com> wrote:
>>
>>> Is lookup function searches for keys which are strings? say
>>> <b> lookup("foo",myArray)? </b>
>>>
>>> I get  undef back. Is this a bug?
>>> what's the good Strings functions library for OpenScad?
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> Discuss at lists.openscad.org
>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20190529/9c6b8c9d/attachment.html>


More information about the Discuss mailing list