# Non-existing functions actually returning results

**URL:** https://community.mp3tag.de/t/non-existing-functions-actually-returning-results/51703
**Category:** No Bugs
**Created:** [January 23, 2021, 2:39pm UTC](https://community.mp3tag.de/t/non-existing-functions-actually-returning-results/51703 "2021-01-23T14:39:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)
#### Post date: [January 23, 2021, 2:39pm UTC](https://community.mp3tag.de/t/non-existing-functions-actually-returning-results/51703/1 "2021-01-23T14:39:00Z")

</div>

This is perhaps a non-issue if you know what you're doing, but (mistakingly) using non-existing functions returns non-expected results. For example, I would expect

`$if($nonex(%test%,%example%),yes,no)`

to be invalid or do nothing since the function $nonex doesn't exist. But it actually returns "yes" or "no" depending on the presence of %test% or %example%.

I noticed this when I tried the mac functions `$gt(x,y)` and `$lt(x,y)` in windows. I wasn't expecting them to work in windows, but at first they actually seemed to do so. After a while I noticed that they return identical results, which made me realize that they're not implemented in the windows version - they're only behaving as any non-existing function would.

I don't know if this is a bug or some kind of simplification in the program code, but in any case I find it confusing.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [January 23, 2021, 3:46pm UTC](https://community.mp3tag.de/t/non-existing-functions-actually-returning-results/51703/2 "2021-01-23T15:46:01Z")

</div>

It's not that the function is returning any results, it's just not consumed by the parser. You could write

`$nonex(text)`

and it would just return this very same string. I agree that this might be obscured when nested inside `$if()`, though. However, I don't think that I'll change this anytime soon and I currently can't foresee the potential issues that would arise with such breaking change.

---

<div class="post-metadata">

### Author: ![vilsen](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/v/e95f7d/32.png) [@vilsen](https://community.mp3tag.de/u/vilsen)
#### Post date: [January 23, 2021, 5:39pm UTC](https://community.mp3tag.de/t/non-existing-functions-actually-returning-results/51703/3 "2021-01-23T17:39:01Z")

</div>

Understood.  
These cases would be unusual (and mostly user errors) and I think you'd notice soon enough to correct. So it's a small issue and probably not worth any additional coding.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 22, 2021, 5:39pm UTC](https://community.mp3tag.de/t/non-existing-functions-actually-returning-results/51703/4 "2021-02-22T17:39:51Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
