Skip to content

Commit a5195c0

Browse files
committed
Code Style: Ensure that each operation argument is separated by a comma
Igor Pro does allow omitting the comma between the first and second argument of an operation and also allows adding extranous commas before the first argument. This isn't considered as good coding style [1] and allowing this does also makes the Igor grammar [2] more complicated than needed. [1]: byte-physics/igor-pro-coding-conventions#33 [2]: https://gitlab.byte-physics.de:4001/internal/common-orga-and-tools/-/issues/237
1 parent 9a2679f commit a5195c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

procedures/CodeBrowser_gui.ipf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,19 +421,19 @@ Function updatePopup(ctrlName)
421421
list = GetUserData(panel, "PopupProcedure", userDataNiceList)
422422

423423
if(ItemsInList(list) == 1)
424-
PopupMenu $ctrlName win=$panel, disable=2
424+
PopupMenu $ctrlName, win=$panel, disable=2
425425
else
426-
PopupMenu $ctrlName win=$panel, disable=0
426+
PopupMenu $ctrlName, win=$panel, disable=0
427427
endif
428428

429429
// try to restore the previously selected item if it differs from the current one
430430
variable newIndex = WhichListItem(itemText, list) + 1
431431

432432
if(newIndex != index) // only update if required, as the update triggers the list generating function
433433
if(newIndex > 0)
434-
PopupMenu $ctrlName win=$panel, mode=newIndex
434+
PopupMenu $ctrlName, win=$panel, mode=newIndex
435435
else
436-
PopupMenu $ctrlName win=$panel, mode=1
436+
PopupMenu $ctrlName, win=$panel, mode=1
437437
endif
438438
endif
439439
End

procedures/CodeBrowser_preferences.ipf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static Function SyncPackagePrefsStruct(prefs)
7373
// Panel does exists. Set prefs to match panel settings.
7474
prefs.version = kPrefsVersion
7575

76-
GetWindow $GetPanel() wsize // returns points
76+
GetWindow $GetPanel(), wsize // returns points
7777

7878
#if (IgorVersion() >= 7.0)
7979
scale = ScreenResolution / PanelResolution(GetPanel())

0 commit comments

Comments
 (0)