GIMP Chat http://gimpchat.com/ |
|
Shortening mouse/keystrokes save/export script or method to implement? http://gimpchat.com/viewtopic.php?f=8&t=20332 |
Page 1 of 3 |
Author: | kittmaster [ Sat Apr 15, 2023 9:27 pm ] |
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem |
I would also mention a creature feature to help eliminate mouse clicking and typing would be for the .xcf file and exported png/jpg to pickup/use the folder name...in which....should already be named movie/tv show (date) and construct filenames based on that with the proper index concatenated. So if I was building a clearart file located in a proper movie name like: After Earth (2013) When the export is ready, it would generate the files: After Earth (2013).xcf After Earth (2013)-clearart.png I was also thinking about the index 4, makes sense in this stage, a bonus would be when the save/export is called, that all of the art types are represented with checkboxes defaulted to FALSE and when you select a single only checkmark, it uses that checkmarks index to output the appropriate file naming convention. I am looking at everything here and its a pretty sweet so far, thanks for the assist on this, it would have been very difficult to even get to where this is at now as I'm learning this from scratch. So thank you for your efforts. Chris |
Author: | kittmaster [ Sat Apr 15, 2023 10:05 pm ] |
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem |
I'm getting this error: > (KodiSkinPath (gimp-image-get-id) (ReadKodiSaveArtType)) Error: eval: unbound variable: read-line Using Windows 10. TY. |
Author: | AlSchemist [ Sun Apr 16, 2023 6:11 am ] |
Post subject: | KodiSave 1.1 + I/O read-line |
kittmaster wrote: Error: eval: unbound variable: read-line KodiSave 1.1 + I/O read-line I forgot read-line from the I/O library powered by Richard O'Keefe in the Indiana University Bloomington repository. Because this library is included with credits in my GimpLambdaLib 0ts-stdio.scm So I removed my entire GimpLambdaLib to keep only KodiSave.scm version 1.1 pusblished in GimpChat page 1. read-line has been added at the end of this script. So you do not need to install the GimpLambdaLib. I found that the Gimp status bar is very volatile. ![]() The KodiSave message is often overwritten by any other messages if the user moves the mouse pointer. Attachment: KodiSaveWarning.png [ 80.44 KiB | Viewed 1680 times ] So, in 1.1, the KodiSave message is also displayed in the Error console even if it is not an error. To open the Gimp Error console, click Gimp menu "Windows" > "Dockable Dialogs" > "Error Console". KodiSave will display its message of export in a persistent way until you clear the Error Console. ![]() I will analyse your detailed requirements #10 and #11 soon. |
Author: | AlSchemist [ Sun Apr 16, 2023 1:54 pm ] |
Post subject: | KodiSave 1.5 with art type dialog box |
KodiSave 1.5 with dialog box for art type = clearart KodiSave 1.5 with dialog box strongly simplifies the Scheme code since the text file KodiSaveArtType.txt is no longer required. Hence the I/O library for Script-Fu has been removed. However you would select the art type in the dlgbox if you wish to change it. Code: Select all ; script-fu-kodi-save.scm 1.5 saves the current image as .xcf and export as .png or .jpg Attachment: KodiSaveClearArt1.png [ 132.15 KiB | Viewed 1670 times ] kittmaster wrote: a bonus would be when the save/export is called, that all of the art types are represented with checkboxes defaulted to FALSE and when you select a single only checkmark, it uses that checkmarks index to output the appropriate file naming convention. Checkboxes in Gimp Script-Fu are defined by SF-TOGGLE. However the user could check more than one art type. I prefer a listbox more easier to be coded in only one line since the vector of art type already exists since version 1.0 ![]() Code: Select all SF-OPTION "Art type" (vector->list vKodiArtSuffix)
![]() _____ Attachment: KodiSaveClearArt2.png [ 142.26 KiB | Viewed 1670 times ] Once you confirmed the saving of .xcf and the export to .png:
|
Author: | AlSchemist [ Sun Apr 16, 2023 2:12 pm ] |
Post subject: | Next movie |
Next movie Attachment: KodiSavePoster1.png [ 27.39 KiB | Viewed 1670 times ]
art type = poster Attachment: KodiSavePoster2.png [ 138.01 KiB | Viewed 1670 times ]
poster => .jpg Attachment: KodiSavePoster3.png [ 163.55 KiB | Viewed 1670 times ]
Note: saving a picture in .jpg destroys a little bit its quality at each saving. ![]() Code: Select all (file-jpeg-save RUN-NONINTERACTIVE imgSkin layerSkin fullSkin fullSkin 0.97 0 TRUE FALSE "" 1 FALSE FALSE 2) In the Script-Fu console if you click the Browse button for the function file-jpeg-save, you could read its help: Code: Select all (file-jpeg-save run-mode image drawable filename raw-filename quality smoothing optimize progressive comment subsmp baseline restart dct) quality = 0.97 More the quality is close to 100% more the .jpg is big. Tune other parameters since I never save in .jpg format. I prefer the Google format Web Photo: .webp ![]() Once you saved .xcf and exported .png or .jpg according to the art type, do you go to the next movie or you prefer to keep the current image in the Gimp editor for example to improve the .xcf Give details how you switch between movies. Do you wish to persist the shape of the last selection between two movies? ![]() What kind of basic editing could be scripted? ![]() |
Author: | kittmaster [ Sun Apr 16, 2023 9:10 pm ] |
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem |
I just gave it a whirl....very nice...easy to use. I made some changes to the array image types, see code below. I also moved the location to the file menu as that is where I would put it (I understand current location makes access easy) For the FanartSharp, the # sign is actually used for a place holder to support multiple fanart images as there can be more than one. There is always fanart.jpg.... always, media companion (which I use) offers up to 10 additional.... so there should/could be up to 10 more images in the folder. So it would look like fanart1.jpg, fanart2.jpg, fanart3.jpg, fanart4.jpg......and so on. So I think it would need a modification so if in the pulldown you select fanart for the output of the image, then it enables a spinner. If 0, then fanart.jpg, 1 fanart1.jpg, 2 fanart2.jpg......and so on. Not sure how easy that is implemented, but that is how the naming was established via kodi. The link is working now: https://kodi.wiki/view/Artwork_types#fanart# https://kodi.wiki/images/7/7c/LocalTVShowArtwork01.jpg When export is complete, switching to the next movie, I found myself closing all the files and starting a manual selection of the next movie. Most of this is done in a sandbox before moving to a storage NAS because trying to do it live could cause errors and that would be a bad thing. So once save/export is done, that is where it should stop. I will think about the workflow a bit more and update if it makes sense to modify or leave as is. The only other thought would be, the "bar" that shows status...is there a way to have a text label that says something like "Save Status:" above it? I was thinking having a message prior to saving "Waiting for User Selection"... after options are selected... then it updates as it does now. If not, no issue, just thinking out loud. Let me think about the basic editing inquiry, that requires a bit of A > B > C > D thinking before I can make a suggestion there. Marvelous work!! ![]() ![]() EDIT: My modified code: Code: Select all ; script-fu-kodi-save.scm 1.2 saves the current image as .xcf and export as .png |
Author: | AlSchemist [ Thu Apr 20, 2023 3:21 pm ] |
Post subject: | KodiSave 1.3 FanArt# |
KodiSave 1.3 FanArt# See above the updated source code 1.3. ![]() kittmaster wrote: I also moved the location to the file menu as that is where I would put it You are no longer a rookie ![]() Great learning! ![]() kittmaster wrote: the "bar" that shows status...is there a way to have a text label that says something like "Save Status:" above it? ...having a message prior to saving "Waiting for User Selection"... after options are selected... It is too ambitious ![]() ![]() ![]() ![]() There is not any event fired ![]() Code: Select all (script-fu-kodi-save img layer artTypeIdx fanArtNbr) kittmaster wrote: enables a spinner. If 0, then fanart.jpg, 1 fanart1.jpg, 2 fanart2.jpg Code: Select all SF-ADJUSTMENT "FanArt only" '(0 0 30 1 10 0 0) Attachment: KodiSaveFanArt0.png [ 125.94 KiB | Viewed 1641 times ] By defaut the FanArt only numerical suffix is zero: Attachment: KodiSaveFanArt0saved.png [ 120.74 KiB | Viewed 1641 times ] it is not added after "-fanart". Attachment: KodiSaveFanArt1.png [ 133.93 KiB | Viewed 1641 times ] If the user clicks on the upper arrow of the spinner or moves the cursor, ![]() FanArt only numerical suffix is added after "-fanart" and before the file extensionn ".jpg" Finally, pay attention to the underscore ![]() Code: Select all (script-fu-register "script-fu-kodi-save" "_KodiSave" "KodiSave V1.3" "AlSchemist" It enables the shortcut Alt+File > KodiSave. ![]() |
Author: | kittmaster [ Sat Apr 22, 2023 7:51 am ] | |||
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem | |||
The revision is exactly what I was looking for it to do... ![]() ![]() I gave it some exercise, it did generate one unexpected result and I can't replicate it, but figure I post it so you can see what I ran into and if you may have an idea what might have caused it. I took an image from my NAS collection. It was the landscape image of Aliens (1986). I renamed it to "Aliens Horizontal image.jpg" for the sake testing. I created a folder on my desktop: Aliens (1986) ----> Just as it would be as expected from intent of this script. The order I tried before I noticed the issue: --- I loaded the image in GIMP --- Exported Landscape -> OK --- Exported Actor -> OK --- Exported Fanart - Spinner set to 6 -> Failed, added suffix unexpectedly as fanart5.XXXXXXX -> continue --- Exported Fanart - Spinner set to 5 -> OK --- Exported Fanart - Spinner set to 6 -> OK Deleted all images except starting image "Aliens Horizontal image.jpg" Replicated steps above, no issue all exported OK. Not sure how to replicate this issue, only happened once thus far, so I'll try to track it, but figured I'd provide feedback incase you may have an idea what generated the issue. It seems like an initialization variable may be needed set to 0? I was going to take a look to see if I can manage that, but not sure as of this writing. Other than that, this thing is excellent and amazed with the outcome, thank you again for the efforts, reading the code helps me a bit more to understand how scheme works. Never used this language before, so it is a good learning experience. ![]() ![]() Chris
|
Author: | kittmaster [ Sat Apr 22, 2023 8:11 am ] | ||
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem | ||
Also forgot to mention, it seems to be warning me every time it exports even though it works as expected. I did a normal export and it didn't flag any warnings. Have no idea what would cause that, but noticed the behavior.
|
Author: | AlSchemist [ Sun Apr 23, 2023 9:45 am ] |
Post subject: | KodiSave 1.4 FanArt# as integer |
KodiSave 1.4 FanArt# as integer See above the updated source code 1.4. ![]() kittmaster wrote: be warning me every time it exports even though it works as expected This behavior is by design. Since, the KodiSave message in the status bar could disappear, we use the Error window to persist the message as a warning even if it is not a warning or an error. If you do not wish any message in the Error window, put in comment adding ";" in the beginning of the line 154: Code: Select all (gimp-message (string-append "KodiSave: " fullSkin)) Alternatively, if you do not wish to put in comment gimp-message, you can delete this line. kittmaster wrote: Exported Fanart - Spinner set to 6 -> Failed, added suffix unexpectedly as fanart5.XXXXXXX Do you remember if you moved the cursor or clicked to upper arrow of the spinner? For unknown reason ![]() ![]() To fix the issue:
How to convert a float to an integer in Script-Fu? You can copy and paste the following code in the Script-Fu console. Code: Select all (trunc (round 5.7073)) 6 The boundary is at the half of the interval between 5.0 and 6.0: 5.5 Code: Select all (trunc (round 5.5)) 6 Code: Select all (trunc (round 5.4)) 5 Into the bargain, if there is a decimal dot in the conversion from number to string, we split the string with the known function strbreakup used to split a filename into a root and a file extension: Code: Select all (car (strbreakup (number->string 5.7073 10) ".")) "5" You can try without the function car to get the list of the numbers before and after the decimal dot: Code: Select all (strbreakup (number->string 5.7073 10) ".") ("5" "7073") Finally, if the issue occurs too often, put in comment adding ";" in the beginning of the line "SF-ADJUSTMENT". Then remove ";" in the line below starting with "SF-VALUE". The spinner will be replaced with an input box initialized with "0". Before: with the spinner Code: Select all SF-ADJUSTMENT "FanArt only" '(0 0 30 1 10 0 1) After: without the spinner but a basic input box Code: Select all ; SF-ADJUSTMENT "FanArt only" '(0 0 30 1 10 0 1) In the free editor NotePad++, adding ";" in the beginning of the line renders the line as a green comment. ![]() After the editing of a Script-Fu source code .scm such as KodiSave.scm, we recommend to close Gimp then restart Gimp even if there is the menu "Filter" > "Script-Fu" > "Refresh scripts". So we are sure that the memory used by Script-Fu will be correctly released. ![]() |
Author: | kittmaster [ Tue Apr 25, 2023 9:49 am ] | ||
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem | ||
I was trying 1.4 out but not for fanart (other things to complete), I went to export as banner and ran into this output error:
|
Author: | kittmaster [ Wed Apr 26, 2023 2:30 pm ] |
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem |
Also, can you guide me to a scheme debugger so I can single step and try and learn the code sequence? I found DrRacket, but it was not working as I expect with GIMP script. I do use Visual Studio for C++ and VB, so it isn't a stretch to learn, just knowing the right tool and getting it setup so I can learn and adapt to a different environment. Thanks again for all your help, will continue to try and understand how scheme works. Chris |
Author: | AlSchemist [ Wed Apr 26, 2023 5:24 pm ] |
Post subject: | Error: car: argument 1 must be: pair |
I cannot reproduce the following issue with art type "Banner" index 2 in KodiSave 1.4 Try to indicate more context such as full path of picture, states of each element of the KodiSave dialog box. Error: car: argument 1 must be: pair Run the Script-Fu console by "Filters" > "Script-Fu" > "Console" (Alt+R S C). The function car retrieves the first element of a given list such as '("root" "png") Code: Select all (car '("root" "png")) "root" Let us remove manually the first element. The list becomes '("png") Code: Select all (car '("png")) "png" Let us remove again the first element. The list becomes empty '() Code: Select all (car '()) Error: car: argument 1 must be: pair ![]() In other words, car does not like the empty list. In KodiSave 1.4, I mainly introduced car in KodiSkinPath in the affection of the local variable strFanArt of type string. Code: Select all (strFanArt (car (strbreakup (number->string intFanArt 10) "."))) You cannot directly run this affection. But try to run the examples in comment starting with ";" above the define such as the last one: Do not copy the ";" but after from the opening parenthesis until the corresponding closing parenthesis. Code: Select all (KodiSkinPath "C:\\Movies\\Aliens (1986)" "Aliens (1986)" 7 5.1) "C:\\Movies\\Aliens (1986)\\Aliens (1986)-fanart5.jpg" It does not matter if the path exists or not. The expected result is also supplied as a comment before the define. Try to reproduce your own context about:
|
Author: | AlSchemist [ Wed Apr 26, 2023 5:31 pm ] |
Post subject: | Debugging Script-Fu |
Debugging Script-Fu You can debug only in the Script-Fu console. Close Gimp then restart it You must reproduce the parameters during the call of (script-fu-kodi-save img layer artTypeIdx fanArtNbr)
So clicking to the menu File > KodiSave is equivalent to the call in the console: Code: Select all (script-fu-kodi-save 1 2 2 0) (#t) If you do not want to manage the first two parameters, replace img and layer by the call of their respective functions, but it is longer: Code: Select all (script-fu-kodi-save (gimp-image-get-id) (car (gimp-image-get-active-drawable (gimp-image-get-id))) 2 0) (#t) In the console, you can enable tracing for debugging purpose by: Code: Select all (tracing 1) "Gives: 0" should be the Script-Fu's answer displaying the previous state of tracing. tracing will trace all calls until the fatal error. Disable the tracing by: Code: Select all (tracing 0) Eval: (tracing 0) Eval: tracing Eval: 0 Apply to: (0)1 Tracing is extremely verbose: 4 instructions are displayed to disable the tracing. You could insert (tracing 1) inside any function to start tracing only on purpose. But choose the function that could be the closest of the bug. Otherwise, you could have a lot of traces and the performance is dramatically reduced. When you call a function in the console, you can use: Code: Select all (display "text") text#t and Code: Select all (displayln "return to the line") return to the line #t display could be more useful than: Code: Select all (gimp-message "warning") gimp-message displays a warning in the Error window. Finally, try to run all the calls in comment and compare with each expected result. Search the functions that call car. You can remove the body of let* to check only if the local variables work. ![]() See in post #6 "let* us introduce local variables:". If all local variables work, reintroduce step by step the body of let* until the fatal error is found. |
Author: | AlSchemist [ Wed Apr 26, 2023 5:40 pm ] |
Post subject: | Environment of developement for Script-Fu |
Environment of developement for Script-Fu DrRacket is the best to learn the different dialects about Scheme. However starting DrRacket is very long. You cannot simulate the Gimp API: so all functions beginning with "gimp-" do not work. Try DrRacket to learn the basic primitives of Scheme. DrRacket has a classical debugger If you select for example "let*" then press F1, there is a contextual help online Visual Studio or VScode could edit .scm source file: search "scheme" in the free extensions to color the keywords. I prefer Notepad++ menu "Language" > "Scheme" because the loading of the editor is faster. Ctrl+Alt+B on the closing parenthesis selects the entire Scheme expression until the corresponding open parenthesis. It is very useful to copy and paste a call to a function and its parameters in the console. In all cases, only the Script-Fu console must be used to run Script-Fu source code .scm Running remotely Gimp as a Script-Fu server from the client NotePad++ or VScode is out of the scope of this post. Gimp menu "Filter" > "Script-Fu" > "Start Server..." ![]() |
Author: | kittmaster [ Thu Apr 27, 2023 8:34 pm ] |
Post subject: | Re: Error: car: argument 1 must be: pair |
AlSchemist wrote: I cannot reproduce the following issue with art type "Banner" index 2 in KodiSave 1.4 Try to indicate more context such as full path of picture, states of each element of the KodiSave dialog box. Error: car: argument 1 must be: pair Run the Script-Fu console by "Filters" > "Script-Fu" > "Console" (Alt+R S C). The function car retrieves the first element of a given list such as '("root" "png") Code: Select all (car '("root" "png")) "root" Let us remove manually the first element. The list becomes '("png") Code: Select all (car '("png")) "png" Let us remove again the first element. The list becomes empty '() Code: Select all (car '()) Error: car: argument 1 must be: pair ![]() In other words, car does not like the empty list. In KodiSave 1.4, I mainly introduced car in KodiSkinPath in the affection of the local variable strFanArt of type string. Code: Select all (strFanArt (car (strbreakup (number->string intFanArt 10) "."))) You cannot directly run this affection. But try to run the examples in comment starting with ";" above the define such as the last one: Do not copy the ";" but after from the opening parenthesis until the corresponding closing parenthesis. Code: Select all (KodiSkinPath "C:\\Movies\\Aliens (1986)" "Aliens (1986)" 7 5.1) "C:\\Movies\\Aliens (1986)\\Aliens (1986)-fanart5.jpg" It does not matter if the path exists or not. The expected result is also supplied as a comment before the define. Try to reproduce your own context about:
I have found the reason but not sure the fix. I open gimp, images located in "C:\Users\chris\Desktop\Kodi\1883 (2023)", load image file 1, load image file 2, merge 1 and 2 into template (banner > local template to me 1000x185)... click on KodiSave... "Error: car: argument 1 must be: pair" Now, if I do a File > Save As > Whatever.xcf Return and Click "KodiSave".... select banner > works as it did before......all good. So something strange with the initial save aspect?? I am using your info about debugging in console to trace, some things I can see/understand, many of the things I try I get: > PathInfoPic #<CLOSURE> |
Author: | kittmaster [ Thu Apr 27, 2023 8:59 pm ] |
Post subject: | Re: Shortening mouse/keystrokes save/export script or method to implem |
I got how to reproduce error, using method I described above. It works with a single layer, 2 layers, 3 layers > crash (I assume it will also crash on 5, 7, 9, 11 or any other odd number of layers) Ok, so I open image 1 (Tab1) Open image 2 (Tab 2) Create new image (Tab 3 Blank > Dimensions I am using 1000x185 > Should not matter) Tab 1, select all, Copy, Paste as new layer into Tab 3 Tab 2, select all, Copy, Paste as new layer into Tab 3 Kodisave with Tab 3 Active > Click > must be: Pair error I have to do the method this way because in order to create a "banner" for Kodi, I need a Main background image of the movie/tv show itself, I use the "clearlogo.png" of the movie/tv show, those two items are combined in Tab 3 using predefined template dimensions of 1000x185 pixel requirements set by Kodi and I use for all banner creation so I don't have to think about it and reduces setup and keystroke entries etc. So it seems the script is trying to do something in pairs vs the active tab layer when it is active. I "think" that is were the issue is, but I can't seem to follow the scheme code to try and adjust it. I will continue to look at it. As a note, 1.2 didn't have this issue. 1.3 is missing in this thread as it was over written by 1.4. So I can't verify 1.3, I am looking to see if I saved a backup copy somewhere so I can test that to see where the issue come in. Hopefully this helps give some insight?? Best, Chris |
Author: | AlSchemist [ Fri Apr 28, 2023 3:44 pm ] |
Post subject: | KodiSave 1.5 untitled image |
Great description, Chris! ![]() ![]() ![]() See in page 2 the updated source code 1.5. ![]() kittmaster wrote: images located in "C:\Users\chris\Desktop\Kodi\1883 (2023)", load image file 1, load image file 2, merge 1 and 2 into template (banner So merge 1 and 2 should be in the same folder than the last loaded image 2. kittmaster wrote: Create new image This the new operating mode. In all previous screen captures in page 1-2, the first step was a drag-and-drop: so the target picture had always a title. When you create a new picture, the image has not yet been saved and its title is: "Untitled": Attachment: Untitled.png [ 139.58 KiB | Viewed 621 times ] KodiSave 1.5 introduces the new function SearchFilename starting from the target image having merge 1 and 2. If the filename is empty, SearchFilename searchs in the vector of all loaded images then choose the last loaded image having a non empty filename. Attachment: Banner.png [ 164.44 KiB | Viewed 621 times ] In our case, it is picture 2 with a green frame. The SearchFilename code begins to be complex with three levels of let* ![]() |
Author: | AlSchemist [ Fri Apr 28, 2023 3:54 pm ] |
Post subject: | How to debug the car issue? |
How to debug the car issue? Code: Select all (tracing 1) enabled the very very long trace of all functions ended by (car '()) ; first element of the empty list generated the fatal error. After the error, never forget to restore the disabled trace by: Code: Select all (tracing 0) The bug was in PathInfoPic: the fullname of an untitled image was the empty string. ![]() Spliting the empty fullname removing each DIR-SEPARATOR generated (""). Removing the filename from lstPath generated the empty list (). Rebuilding the path without the filename caused the fatal error in unbreakupstr. ![]() This function is provided in C:\Program Files\GIMP 2\share\gimp\2.0\scripts\script-fu-compat.init And, until now, I did not know that unbreakupstr could include the call of car. The fun of the story is that, in 1.5, I instrumented KodiSave replacing all calls of car by a debug version named carDbg. carDbg does exactly what car does but if the list is empty, carDbg displays the running context: the caller and one of its parameter. In fact, carDbg never fired the fatal error since it was in ![]() ![]() |
Author: | AlSchemist [ Fri Apr 28, 2023 4:02 pm ] |
Post subject: | Welcome to Lisp |
Welcome to Lisp kittmaster wrote: PathInfoPic #<CLOSURE> The notion of closure is relative to an environment and the scope of variables. Is the function PathInfoPic a closure? ![]() Code: Select all (closure? PathInfoPic) #t Is the function PathInfoPic a procedure? ![]() Code: Select all (procedure? PathInfoPic) #t Retrieving the Lisp code of a closure as lambda expression: Code: Select all (get-closure-code PathInfoPic) (lambda (img) (let* ((fullname (SearchFilename img)) (lstPath (strbreakup fullname DIR-SEPARATOR)) (lstDir (reverse (cdr (reverse lstPath)))) (path (unbreakupstr lstDir DIR-SEPARATOR)) (filename (carDbg (last lstPath) 'PathInfoPic2 lstPath)) (lstFile (strbreakup filename ".")) (basename (carDbg lstFile 'PathInfoPic3 filename)) (filExt (carDbg (last lstFile) 'PathInfoPic4 filename))) (vector path basename filExt))) Is the function car a procedure? Code: Select all (procedure? car) #t However car is not a closure: ![]() Code: Select all (closure? car) #f One cannot retrieve the Lisp code of car since it is a basic primitive. ![]() Code: Select all (get-closure-code car) #f |
Page 1 of 3 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |