# How to write symbol ";" in Dynamo Code Block

**URL:** <https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985>\
**Category:** Revit\
**Created:** [November 20, 2024, 11:07am UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985 "2024-11-20T11:07:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![NurlanAdsk](https://avatars.discourse-cdn.com/v4/letter/n/22d042/32.png) [@NurlanAdsk](https://forum.dynamobim.com/u/NurlanAdsk)\
**Post date:** [November 20, 2024, 11:07am UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/1 "2024-11-20T11:07:18Z")

</div>

The backslash escape doesn’t work. I use a string node, but I wonder how to do this in a code block.

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [November 20, 2024, 11:27am UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/2 "2024-11-20T11:27:53Z")

</div>

That seems to be a bug in the Code Block, it should process a semicolon only if it is outside quotes. A String node is the only way, I’m afraid.

---

<div class="post-metadata">

**Author:** ![c.poupin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/c.poupin/32/89152_2.png) [@c.poupin](https://forum.dynamobim.com/u/c.poupin)\
**Post date:** [November 20, 2024, 2:13pm UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/3 "2024-11-20T14:13:51Z")

</div>

Tested in Dynamo 3.2

1. Enter `";";` in a code block
2. place cursor at the end of 1st line and press `suppr`

![semicolon](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/0/b0e675d0afeb414bd5920665b514a4bd52490928.gif)

---

<div class="post-metadata">

**Author:** ![Sriram.Rajagopal](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sriram.rajagopal/32/191994_2.png) [@Sriram.Rajagopal](https://forum.dynamobim.com/u/Sriram.Rajagopal)\
**Post date:** [November 20, 2024, 2:31pm UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/4 "2024-11-20T14:31:06Z")

</div>

Hi @Anton_Huizinga , even if its in next line, still its considered as a string with single line. Attached the snap for reference

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/d/7d57761dfffb817c2a6f57eefdecbdfdf94c0d5b.png)

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [November 20, 2024, 3:01pm UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/5 "2024-11-20T15:01:43Z")

</div>

It adds a new line character to it. And it doesn’t look well inside the Code Block.

But if one really don’t want to work with the String node, it is an option, especially with the Trim function:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/2/929359ab3a6e41873fa02ace948208076d7c3c3d.png)

And sometimes, semicolons are used when you import data from CSV or so. Then you will loose the columns.

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [November 20, 2024, 3:04pm UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/6 "2024-11-20T15:04:25Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/a/7ac45f6bf429f9cc2ab70ae538ed0e827db8caff.png)

But fun to play with workarounds 🙂

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/890cf72cb53cc1efb06a60556fcddc0a680ea25f.png)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [November 20, 2024, 3:13pm UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/7 "2024-11-20T15:13:03Z")

</div>

The issue here seems to be that Dynamo is still automatically adding a linebreak like the semi-colon isn’t part of the string but still respecting the string characters. Removing the linebreak after it’s added fixes the problem. Not sure if this has been caught yet, so it’s worth submitting as a bug fix. Good find.  
[New Issue · DynamoDS/Dynamo](https://github.com/DynamoDS/Dynamo/issues/new/choose)

---

<div class="post-metadata">

**Author:** ![Anton\_Huizinga](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/anton_huizinga/32/155377_2.png) [@Anton\_Huizinga](https://forum.dynamobim.com/u/Anton_Huizinga)\
**Post date:** [November 20, 2024, 3:23pm UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/8 "2024-11-20T15:23:25Z")

</div>

In 2015 is was added to the list but propably lost somewhere.

> [@Semicolon](https://forum.dynamobim.com/t/semicolon/1212/8):
>
> Thank you for the report. The issue is being tracked internally (MAGN-6713).

---

<div class="post-metadata">

**Author:** ![Mike.Buttery](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Mike.Buttery](https://forum.dynamobim.com/u/Mike.Buttery)\
**Post date:** [November 22, 2024, 6:37am UTC](https://forum.dynamobim.com/t/how-to-write-symbol-in-dynamo-code-block/105985/9 "2024-11-22T06:37:21Z")

</div>

Already picked up by @Vikram_Subbaiah in 2021 here [Semi Colon as String in Code Block · Issue #12152 · DynamoDS/Dynamo · GitHub](https://github.com/DynamoDS/Dynamo/issues/12152)

And here’s the offending code [Dynamo/src/DynamoCore/Graph/Nodes/CodeBlockUtils.cs at 3e2036956206d9f16126c73cbf3a612ec444da83 · DynamoDS/Dynamo · GitHub](https://github.com/DynamoDS/Dynamo/blob/3e2036956206d9f16126c73cbf3a612ec444da83/src/DynamoCore/Graph/Nodes/CodeBlockUtils.cs#L204)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/2/228244d0d0ac60f431d75bc89067807371322055.png)
